import{_ as e,b as a}from"./el-layout._U-vZTft.js";import{r as l,c as o,aq as s,b as t,d,e as i,f as u,w as r,g as n,z as c,x as b,l as p,M as m,p as f}from"./index-DVkgSHpn.js";const h=e({__name:"el-checkbox",props:{name:{type:[String,Number],default:""},shape:{type:String,default:"square"},modelValue:{type:[Boolean,Number],default:!1},disabled:{type:[String,Boolean],default:!1},labelDisabled:{type:[String,Boolean],default:!0},activeColor:{type:String,default:""},iconSize:{type:[String,Number],default:""},labelSize:{type:[String,Number],default:""},size:{type:[String,Number],default:15}},emits:["modelValue","update:modelValue","change"],setup(e,{emit:h}){const y=e,g=h;l(!1),l({});const S=o((()=>y.modelValue?"#ffffff":"transparent")),x=o((()=>{let e=[];return e.push("icon-box-"+y.shape),y.modelValue&&e.push("icon-box-checked"),y.disabled&&e.push("icon-box-disabled"),y.modelValue&&y.disabled&&e.push("icon-box-disabled-checked"),e.join(" ")})),z=o((()=>{let e={};return y.activeColor&&y.modelValue&&!y.disabled&&(e.borderColor=y.activeColor,e.backgroundColor=y.activeColor),e.width=s(y.size,!0),e.height=s(y.size,!0),e})),V=()=>{g("change",{value:!y.modelValue,name:y.name}),g("update:modelValue",!y.modelValue)},k=()=>{y.disabled||V()},v=()=>{y.labelDisabled||y.disabled||V()};return(l,o)=>{const h=t(d("uni-icons"),a),y=f;return i(),u(y,{class:"el-checkbox"},{default:r((()=>[n(y,{class:c(["icon-wrap",[x.value]]),onClick:k,style:b([z.value])},{default:r((()=>[n(h,{type:"checkmarkempty",size:e.size-2,color:S.value},null,8,["size","color"])])),_:1},8,["class","style"]),n(y,{class:"el-checkbox-label",onClick:v,style:b({fontSize:p(s)(e.labelSize)+"px"})},{default:r((()=>[m(l.$slots,"default",{},void 0,!0)])),_:3},8,["style"])])),_:3})}}},[["__scopeId","data-v-5163d3d1"]]);export{h as _};
//# sourceMappingURL=el-checkbox.DqvOzTsU.js.map
