"use strict"; const common_vendor = require("../../common/vendor.js"); const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js"); require("../../common/libraries/day.js"); const gen_Apis = require("../../gen/Apis.js"); require("../../common/libraries/request.js"); require("../../common/store/useWeAppAuthStore.js"); require("../../common/store/useWorkStore.js"); if (!Array) { const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons"); const _easycom_hs_popup2 = common_vendor.resolveComponent("hs-popup"); (_easycom_uni_icons2 + _easycom_hs_popup2)(); } const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js"; const _easycom_hs_popup = () => "../hs-popup/hs-popup.js"; if (!Math) { (_easycom_uni_icons + _easycom_hs_popup)(); } const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "hs-popup-house", props: ["Apis"], emits: ["close", "change"], setup(__props, { emit }) { const selectEd = common_vendor.ref({ name: "全部房屋", id: 0 }); const pickerList = common_vendor.ref([]); const popupShow = common_vendor.ref(false); const onPopupShow = () => { popupShow.value = !popupShow.value; if (popupShow.value) { getPickerList(); } }; const getPickerList = () => { var _a, _b, _c; common_libraries_apiLoading.getApiLoading((_c = (_b = (_a = gen_Apis.Apis) == null ? void 0 : _a.Archive) == null ? void 0 : _b.HouseOccupants) == null ? void 0 : _c.List, {}).then((res) => { pickerList.value = [...[{ asset_house: { full_name: "全部房屋" }, id: 0 }], ...res == null ? void 0 : res.data]; console.log(res); }); }; const onSelectMerchant = (i) => { var _a; selectEd.value = { name: (_a = i == null ? void 0 : i.asset_house) == null ? void 0 : _a.full_name, id: i == null ? void 0 : i.id }; emit("change", (i == null ? void 0 : i.asset_houses_id) || ""); onPopupShow(); }; return (_ctx, _cache) => { var _a; return { a: common_vendor.t((_a = selectEd.value) == null ? void 0 : _a.name), b: common_vendor.p({ type: "down", color: "#333", size: "12" }), c: common_vendor.o(onPopupShow), d: common_vendor.f(pickerList.value, (i, index, i0) => { var _a2, _b, _c; return common_vendor.e({ a: common_vendor.t((_a2 = i == null ? void 0 : i.asset_house) == null ? void 0 : _a2.full_name), b: ((_b = selectEd.value) == null ? void 0 : _b.id) === (i == null ? void 0 : i.id) }, ((_c = selectEd.value) == null ? void 0 : _c.id) === (i == null ? void 0 : i.id) ? { c: "cc8caa34-2-" + i0 + ",cc8caa34-1", d: common_vendor.p({ type: "checkmarkempty", size: "20", color: "#2A7EFB" }) } : {}, { e: `key_${index}`, f: common_vendor.o(($event) => onSelectMerchant(i), `key_${index}`) }); }), e: common_vendor.o(onPopupShow), f: common_vendor.p({ show: popupShow.value, mode: "bottom", closeable: true, round: 20 }) }; }; } }); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-cc8caa34"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/components/hs-popup-house/hs-popup-house.vue"]]); wx.createComponent(Component);