System.register(["./index-legacy-fdce4919.js"],(function(e,l){"use strict";var o,a,i,n,c,t,s,r,d,u,b,v;return{setters:[e=>{o=e.a3,a=e.m,i=e.n,n=e.d,c=e.a9,t=e.b6,s=e.t,r=e.r,d=e.e,u=e.a,b=e.I,v=e.o}],execute:function(){const l=e("c",{name:o,shape:a("round"),disabled:Boolean,iconSize:i,modelValue:o,checkedColor:String,labelPosition:String,labelDisabled:Boolean});e("s",n({props:c({},l,{bem:t(Function),role:String,parent:Object,checked:Boolean,bindGroup:s}),emits:["click","toggle"],setup(e,{emit:l,slots:o}){const a=r(),i=l=>{if(e.parent&&e.bindGroup)return e.parent.props[l]},n=d((()=>i("disabled")||e.disabled)),c=d((()=>i("direction"))),t=d((()=>{const l=e.checkedColor||i("checkedColor");if(l&&e.checked&&!n.value)return{borderColor:l,backgroundColor:l}})),s=o=>{const{target:i}=o,c=a.value,t=c===i||(null==c?void 0:c.contains(i));n.value||!t&&e.labelDisabled||l("toggle"),l("click",o)},k=()=>{const{bem:l,shape:c,checked:s}=e,r=e.iconSize||i("iconSize");return u("div",{ref:a,class:l("icon",[c,{disabled:n.value,checked:s}]),style:{fontSize:v(r)}},[o.icon?o.icon({checked:s,disabled:n.value}):u(b,{name:"success",style:t.value},null)])},p=()=>{if(o.default)return u("span",{class:e.bem("label",[e.labelPosition,{disabled:n.value}])},[o.default()])};return()=>{const l="left"===e.labelPosition?[p(),k()]:[k(),p()];return u("div",{role:e.role,class:e.bem([{disabled:n.value,"label-disabled":e.labelDisabled},c.value]),tabindex:n.value?void 0:0,"aria-checked":e.checked,onClick:s},[l])}}}))}}}));
