"use strict"; const common_vendor = require("../../common/vendor.js"); if (!Array) { const _easycom_u_checkbox2 = common_vendor.resolveComponent("u-checkbox"); const _easycom_u_checkbox_group2 = common_vendor.resolveComponent("u-checkbox-group"); (_easycom_u_checkbox2 + _easycom_u_checkbox_group2)(); } const _easycom_u_checkbox = () => "../../node-modules/uview-plus/components/u-checkbox/u-checkbox.js"; const _easycom_u_checkbox_group = () => "../../node-modules/uview-plus/components/u-checkbox-group/u-checkbox-group.js"; if (!Math) { (_easycom_u_checkbox + _easycom_u_checkbox_group)(); } const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "hs-private-policy", props: { isAgree: { type: Boolean, default: false }, isDisabled: { type: Boolean, default: false }, policyName: { type: String, default: "隐私政策名称" }, activeColor: { type: String, default: "#2A7EFB" } }, emits: ["update:isAgree", "clickPolicy", "clickCheckbox"], setup(__props, { emit }) { const props = __props; const isAgree = common_vendor.ref([]); if (props.isAgree) { isAgree.value = ["isAgree"]; } else { isAgree.value = []; } common_vendor.watch( () => props == null ? void 0 : props.isAgree, () => { if (isAgree.value) { isAgree.value = ["isAgree"]; } else { isAgree.value = []; } } ); const onPolicy = () => { emit("clickPolicy"); }; const handleAgreePrivatePolicy = () => { var _a; if (props.isDisabled) { emit("clickCheckbox"); isAgree.value = []; emit("update:isAgree", false); return; } let checkbox = false; if ((_a = isAgree.value) == null ? void 0 : _a.length) { isAgree.value = []; checkbox = false; } else { isAgree.value = ["isAgree"]; checkbox = true; } emit("update:isAgree", checkbox); }; return (_ctx, _cache) => { return { a: common_vendor.p({ shape: "circle", activeColor: props == null ? void 0 : props.activeColor, name: "isAgree" }), b: common_vendor.o(handleAgreePrivatePolicy), c: common_vendor.p({ modelValue: isAgree.value }), d: common_vendor.o(handleAgreePrivatePolicy), e: common_vendor.t(props.policyName), f: common_vendor.o(onPolicy) }; }; } }); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-48e3a8c0"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/components/hs-private-policy/hs-private-policy.vue"]]); wx.createComponent(Component);