"use strict";const e=require("vue");;/* empty css                */const l=require("./base-iCmnU-fv.js"),p=require("../Web/__directive__/Tooltip.cjs"),C=["id","name","checked","disabled"],b=["for"],v=e.defineComponent({name:"ClCheckboxOne",directives:{cltooltip:p.tooltipDirectives},__name:"One",props:{className:{},forId:{},name:{},label:{},value:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},icon:{},tipMsg:{},tipIcon:{}},emits:["update:value","onChange"],setup(t,{emit:m}){const o=t,a=m,i=l.CommonBase.isEmpty(o.forId)?`cb_${o.name||""}_${l.CommonBase.getRandom(8)}`:o.forId,r=e.computed(()=>{const n={checkbox:!0,"checkbox-default":!0,"checkbox-inline":!0};return o.className&&!l.CommonBase.isEmpty(o.className)&&o.className.split(" ").forEach(c=>{l.CommonBase.isEmpty(c)||(n[c]=!0)}),n}),d=e.computed(()=>{const{tipIcon:n}=o,c={"checkbox-icon-tip":!0};return!l.CommonBase.isEmpty(n)&&n?c[n]=!0:c["clIconFont clIcon-question-circle"]=!0,c}),u=e.computed(()=>({indeterminate:o.indeterminate})),h=(n,c)=>{a("update:value",c),a("onChange",{event:n,value:c})},k=n=>{h(n,n.currentTarget.checked)};return(n,c)=>{const s=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value)},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"checkbox",id:e.unref(i),name:t.name,class:e.normalizeClass(u.value),checked:t.value,disabled:t.disabled,onClick:k},null,10,C),e.createElementVNode("label",{for:e.unref(i)},[t.icon&&t.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(t.icon)},null,2)),[[s,{html:t.label,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.label),1)],64))],8,b)]),t.tipMsg&&t.tipMsg.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(d.value)},null,2)),[[s,{html:t.tipMsg,className:"tooltip-modal"}]]):e.createCommentVNode("",!0)])],2)}}});exports._sfc_main=v;
//# sourceMappingURL=One.vue_vue_type_script_setup_true_lang-E9U8wdGT.js.map
