"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "tips",
  emits: ["cancel", "confirm"],
  setup(__props, { expose, emit }) {
    let details = common_vendor.reactive({
      isshow: false,
      title: "",
      content: "",
      isshowcancel: true,
      cancelTxt: "",
      confirmTxt: "",
      success: null,
      cancel: null,
      close: null
    });
    function setisshow(value) {
      details.isshow = value;
    }
    function setdetails(value) {
      for (let key in value) {
        details[key] = value[key];
      }
    }
    function checkbox(type) {
      switch (type) {
        case 0:
          if (details.close) {
            details.close();
          }
          break;
        case 1:
          if (details.cancel) {
            details.cancel();
          }
          break;
        case 2:
          if (details.success) {
            details.success();
          }
          break;
      }
    }
    expose({ setisshow, setdetails });
    const { isshow, title, content, isshowcancel, cancelTxt, confirmTxt } = common_vendor.toRefs(details);
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.unref(isshow)
      }, common_vendor.unref(isshow) ? common_vendor.e({
        b: common_vendor.t(common_vendor.unref(title) || "提示"),
        c: common_vendor.t(common_vendor.unref(content) || "提示内容模板"),
        d: common_vendor.unref(isshowcancel)
      }, common_vendor.unref(isshowcancel) ? {
        e: common_vendor.t(common_vendor.unref(cancelTxt) || "取消"),
        f: common_vendor.o(($event) => checkbox(1))
      } : {}, {
        g: common_vendor.t(common_vendor.unref(confirmTxt) || "确认"),
        h: common_vendor.o(($event) => checkbox(2)),
        i: common_vendor.o(() => {
        }),
        j: common_vendor.o(($event) => checkbox(0))
      }) : {});
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-27fa88b6"], ["__file", "F:/物流/logPm/compoment/tips/tips.vue"]]);
wx.createComponent(Component);