"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_tdesignUniapp_components_common_utils = require("../common/utils.js");
const useCustomNavbarBehavior = {
  data() {
    return {
      distanceTop: 0
    };
  },
  props: {
    usingCustomNavbar: {
      type: Boolean,
      default: false
    },
    customNavbarHeight: {
      type: Number,
      default: 0
    }
  },
  created() {
    if (this.usingCustomNavbar) {
      this.calculateCustomNavbarDistanceTop();
    }
  },
  methods: {
    calculateCustomNavbarDistanceTop() {
      const { statusBarHeight } = uni_modules_tdesignUniapp_components_common_utils.systemInfo;
      let distance = 0;
      const menuButton = common_vendor.index.getMenuButtonBoundingClientRect();
      distance = menuButton.top + menuButton.bottom - statusBarHeight;
      this.distanceTop = Math.max(distance, this.customNavbarHeight + statusBarHeight);
    }
  }
};
exports.useCustomNavbarBehavior = useCustomNavbarBehavior;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/tdesign-uniapp/components/mixins/using-custom-navbar.js.map
