"use strict";
const common_vendor = require("../../../common/vendor.js");
const gen_Apis = require("../../../gen/Apis.js");
const common_libraries_apiLoading = require("../../../common/libraries/apiLoading.js");
const common_libraries_naviHelper = require("../../../common/libraries/naviHelper.js");
require("../../../common/libraries/request.js");
require("../../../common/store/useWeAppAuthStore.js");
require("../../../common/store/useWatermarkStore.js");
require("../../../common/store/useWorkStore.js");
if (!Array) {
  const _easycom_hs_button2 = common_vendor.resolveComponent("hs-button");
  const _easycom_hs_popup_custom2 = common_vendor.resolveComponent("hs-popup-custom");
  (_easycom_hs_button2 + _easycom_hs_popup_custom2)();
}
const _easycom_hs_button = () => "../../../components/hs-button/hs-button.js";
const _easycom_hs_popup_custom = () => "../../../components/hs-popup-custom/hs-popup-custom.js";
if (!Math) {
  (_easycom_hs_button + _easycom_hs_popup_custom)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "unBindpopup",
  props: ["data"],
  emits: ["success"],
  setup(__props, { emit }) {
    const props = __props;
    const popupShow = common_vendor.ref(false);
    const handleUnBind = () => {
      var _a, _b;
      common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Archive.HouseRegisters.Unbind, {
        external_userid: (_a = props == null ? void 0 : props.data) == null ? void 0 : _a.external_userid,
        asset_houses_id: (_b = props == null ? void 0 : props.data) == null ? void 0 : _b.asset_houses_id
      }).then((res) => {
        common_libraries_naviHelper.showToast("解除成功！");
        emit("success");
        console.log(res);
      });
    };
    return (_ctx, _cache) => {
      var _a, _b;
      return {
        a: common_vendor.o(($event) => popupShow.value = true),
        b: common_vendor.t((_b = (_a = props == null ? void 0 : props.data) == null ? void 0 : _a.asset_house) == null ? void 0 : _b.full_name),
        c: common_vendor.o(handleUnBind),
        d: common_vendor.p({
          label: "确认解绑",
          type: "primary",
          size: "md"
        }),
        e: common_vendor.o(($event) => popupShow.value = false),
        f: common_vendor.p({
          label: "点错了，返回",
          size: "md"
        }),
        g: common_vendor.o(($event) => popupShow.value = false),
        h: common_vendor.p({
          show: popupShow.value,
          mode: "center",
          title: "再次确认"
        })
      };
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-27899cda"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/CUSTOMER/house_list/components/unBindpopup.vue"]]);
wx.createComponent(Component);
