"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
;/* empty css                                               */
;/* empty css                                                */
;/* empty css                                               */
;/* empty css                                                  */
const Vue = require("vue");
const pageHistory = require("../../../utils/pageHistory.js");
const eventBus = require("../../../utils/eventBus.js");
;/* empty css             */
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
const index = require("../../../../node_modules/vant/es/nav-bar/index.js");
const _sfc_main = {
  __name: "NavBar",
  props: {
    isLeftBack: {
      type: Boolean,
      default: false
    },
    leftBackText: {
      type: String,
      default: ""
    },
    isRightButton: {
      type: Boolean,
      default: false
    },
    rightButtonText: {
      type: String,
      default: ""
    }
  },
  setup(__props) {
    const onClickLeft = () => {
      const prevPage = pageHistory.pageHistory.back();
      if (prevPage) {
        eventBus.default.emit("loadPage", prevPage.id);
      }
    };
    return (_ctx, _cache) => {
      const _component_van_nav_bar = index.NavBar;
      return Vue.openBlock(), Vue.createBlock(_component_van_nav_bar, Vue.mergeProps(_ctx.$attrs, {
        "left-arrow": __props.isLeftBack,
        "left-text": __props.isLeftBack ? __props.leftBackText : "",
        "right-text": __props.isRightButton ? __props.rightButtonText : "",
        fixed: false,
        "safe-area-inset-top": "",
        clickable: "",
        onClickLeft
      }), Vue.createSlots({ _: 2 }, [
        Vue.renderList(_ctx.$slots, (item, key) => {
          return {
            name: key,
            fn: Vue.withCtx(() => [
              Vue.renderSlot(_ctx.$slots, key, {}, void 0, true)
            ])
          };
        })
      ]), 1040, ["left-arrow", "left-text", "right-text"]);
    };
  }
};
const _NavBar = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-f6340561"]]);
exports.default = _NavBar;
