"use strict";
const common_vendor = require("../../../../common/vendor.js");
const sheep_index = require("../../../index.js");
require("../../../api/index.js");
require("../../../api/distri/score.js");
require("../../../request/index.js");
require("../../../config/index.js");
require("../../../store/index.js");
require("../../../store/app.js");
require("../../../api/promotion/diy.js");
require("../../../platform/index.js");
require("../../../platform/provider/wechat/index.js");
require("../../../platform/provider/wechat/miniProgram.js");
require("../../../api/member/auth.js");
require("../../../api/member/social.js");
require("../../../api/member/user.js");
require("../../../platform/provider/apple/index.js");
require("../../../platform/share.js");
require("../../../router/index.js");
require("../../../hooks/useModal.js");
require("../../../helper/index.js");
require("../../../helper/test.js");
require("../../../helper/digit.js");
require("../../../api/member/signin.js");
require("../../../helper/throttle.js");
require("../../../url/index.js");
require("../../../platform/pay.js");
require("../../../api/pay/order.js");
require("../../../store/user.js");
require("../../../store/cart.js");
require("../../../api/trade/cart.js");
require("../../../api/pay/wallet.js");
require("../../../api/trade/order.js");
require("../../../api/promotion/coupon.js");
require("../../../store/sys.js");
require("../../../store/modal.js");
require("../../../api/distri/share.js");
require("../../../api/distri/team.js");
require("../../../api/infra/file.js");
require("../../../api/member/address.js");
require("../../../api/member/point.js");
require("../../../api/migration/app.js");
require("../../../api/migration/chat.js");
require("../../../api/migration/index.js");
require("../../../api/migration/third.js");
require("../../../api/pay/channel.js");
require("../../../api/product/category.js");
require("../../../api/product/comment.js");
require("../../../api/product/favorite.js");
require("../../../api/product/history.js");
require("../../../api/product/spu.js");
require("../../../api/promotion/activity.js");
require("../../../api/promotion/article.js");
require("../../../api/promotion/bargain.js");
require("../../../api/promotion/combination.js");
require("../../../api/promotion/rewardActivity.js");
require("../../../api/promotion/seckill.js");
require("../../../api/system/area.js");
require("../../../api/system/voice.js");
require("../../../api/trade/afterSale.js");
require("../../../api/trade/brokerage.js");
require("../../../api/trade/config.js");
require("../../../api/trade/delivery.js");
require("../../../config/zIndex.js");
if (!Array) {
  const _easycom_su_status_bar2 = common_vendor.resolveComponent("su-status-bar");
  const _easycom_su_fixed2 = common_vendor.resolveComponent("su-fixed");
  (_easycom_su_status_bar2 + _easycom_su_fixed2)();
}
const _easycom_su_status_bar = () => "../../../ui/su-status-bar/su-status-bar.js";
const _easycom_su_fixed = () => "../../../ui/su-fixed/su-fixed.js";
if (!Math) {
  (_easycom_su_status_bar + _easycom_su_fixed)();
}
const _sfc_main = {
  __name: "navbar",
  props: {
    sticky: Boolean,
    zIndex: {
      type: Number,
      default: 100
    },
    back: {
      //是否返回上一页
      type: Boolean,
      default: true
    },
    backtext: {
      //返回文本
      type: String,
      default: ""
    },
    bg: {
      type: String,
      default: "bg-white"
    },
    status: {
      //状态栏颜色 可以选择light dark/其他字符串视为黑色
      type: String,
      default: ""
    },
    // 常驻
    alway: {
      type: Boolean,
      default: true
    },
    opacity: {
      //是否开启滑动渐变
      type: Boolean,
      default: false
    },
    opacityBg: {
      //开启滑动渐变后 返回按钮是否添加背景
      type: Boolean,
      default: false
    },
    noFixed: {
      //是否浮动
      type: Boolean,
      default: false
    },
    ui: {
      type: String,
      default: ""
    },
    capsule: {
      //是否开启胶囊返回
      type: Boolean,
      default: false
    },
    stopBack: {
      type: Boolean,
      default: false
    },
    placeholder: {
      type: [Boolean],
      default: true
    },
    bgStyles: {
      type: Object,
      default() {
      }
    }
  },
  emits: ["navback"],
  setup(__props, { emit: __emit }) {
    const state = common_vendor.reactive({
      statusCur: "",
      capsuleStyle: {},
      capsuleBack: {}
    });
    const sys_statusBar = sheep_index.sheep.$platform.device.statusBarHeight;
    const sys_navBar = sheep_index.sheep.$platform.navbar;
    const props = __props;
    common_vendor.onBeforeMount(() => {
      init();
    });
    const init = () => {
      state.capsuleStyle = {
        width: sheep_index.sheep.$platform.capsule.width + "px",
        height: sheep_index.sheep.$platform.capsule.height + "px",
        margin: "0 " + (sheep_index.sheep.$platform.device.windowWidth - sheep_index.sheep.$platform.capsule.right) + "px"
      };
      state.capsuleBack = state.capsuleStyle;
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.s(state.capsuleStyle),
        b: common_vendor.n(props.status == "" ? `text-a` : props.status == "light" ? "text-white" : "text-black"),
        c: common_vendor.s({
          height: common_vendor.unref(sys_navBar) - common_vendor.unref(sys_statusBar) + "px"
        }),
        d: common_vendor.p({
          noFixed: props.noFixed,
          alway: props.alway,
          bgStyles: props.bgStyles,
          val: 0,
          index: props.zIndex,
          noNav: true,
          bg: props.bg,
          ui: props.ui,
          opacity: props.opacity,
          placeholder: props.placeholder,
          sticky: props.sticky
        })
      };
    };
  }
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-81e1f503"], ["__file", "D:/zx/mall-front-app/sheep/components/s-custom-navbar/components/navbar.vue"]]);
wx.createComponent(Component);
