"use strict"; const common_vendor = require("../../common/vendor.js"); const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js"); const gen_Apis = require("../../gen/Apis.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_cell2 = common_vendor.resolveComponent("hs-cell"); const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons"); const _easycom_hs_popup2 = common_vendor.resolveComponent("hs-popup"); (_easycom_hs_cell2 + _easycom_uni_icons2 + _easycom_hs_popup2)(); } const _easycom_hs_cell = () => "../hs-cell/hs-cell.js"; 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_hs_cell + _easycom_uni_icons + _easycom_hs_popup)(); } const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "hs-popup-employees", props: ["Apis", "title"], emits: ["close", "change", "update:valueModel"], setup(__props, { emit }) { const selectEd = common_vendor.ref({ label: "", value: 0 }); const pickerList = common_vendor.ref([]); const popupShow = common_vendor.ref(false); const onPopupShow = () => { popupShow.value = !popupShow.value; if (popupShow.value) { getPickerList(); } }; const getPickerList = () => { common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Company.CompanyEmployees.Select, {}).then((res) => { pickerList.value = res == null ? void 0 : res.data; console.log(res); }); }; const onSelectMerchant = (i) => { selectEd.value = i; emit("change", i); emit("update:valueModel", i == null ? void 0 : i.value); onPopupShow(); }; return (_ctx, _cache) => { var _a; return { a: common_vendor.o(onPopupShow), b: common_vendor.p({ title: __props.title, value: ((_a = selectEd.value) == null ? void 0 : _a.label) || "", isLink: true, isPlaceholder: true, borderTop: true, required: true }), c: common_vendor.f(pickerList.value, (i, index, i0) => { var _a2, _b; return common_vendor.e({ a: common_vendor.t(i == null ? void 0 : i.label), b: ((_a2 = selectEd.value) == null ? void 0 : _a2.value) === (i == null ? void 0 : i.value) }, ((_b = selectEd.value) == null ? void 0 : _b.value) === (i == null ? void 0 : i.value) ? { c: "94efb991-2-" + i0 + ",94efb991-1", d: common_vendor.p({ type: "checkmarkempty", size: "20", color: "#345CA1" }) } : {}, { e: `key_${index}`, f: common_vendor.o(($event) => onSelectMerchant(i), `key_${index}`) }); }), d: common_vendor.o(onPopupShow), e: common_vendor.p({ show: popupShow.value, mode: "bottom", closeable: true, round: 20 }) }; }; } }); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-94efb991"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/components/hs-popup-employees/hs-popup-employees.vue"]]); wx.createComponent(Component);