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