"use strict";
const common_vendor = require("../common/vendor.js");
const SYSTEM_INFO = common_vendor.index.getSystemInfoSync();
const getStatusBarHeight = () => SYSTEM_INFO.statusBarHeight || 0;
const getPreviewBarHeight = () => {
  if (common_vendor.index.getMenuButtonBoundingClientRect) {
    let { top } = common_vendor.index.getMenuButtonBoundingClientRect();
    let PreviewBarHeight = top;
    return PreviewBarHeight;
  } else {
    return 40;
  }
};
const getTitleBarHeight = () => {
  if (common_vendor.index.getMenuButtonBoundingClientRect) {
    let { top, height } = common_vendor.index.getMenuButtonBoundingClientRect();
    let titleBarHeight = (top - getStatusBarHeight()) * 2 + height;
    return titleBarHeight;
  } else {
    return 40;
  }
};
const getNavBarHeight = () => getTitleBarHeight() + getStatusBarHeight();
exports.getNavBarHeight = getNavBarHeight;
exports.getPreviewBarHeight = getPreviewBarHeight;
exports.getStatusBarHeight = getStatusBarHeight;
exports.getTitleBarHeight = getTitleBarHeight;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/system.js.map
