System.register(["./index-legacy.3d6bb858.js"],(function(e){"use strict";var l,n,i,a,o,c,t,r,d,u,s,b;return{setters:[function(e){l=e.O,n=e.y,i=e.E,a=e.d,o=e.N,c=e.aB,t=e.u,r=e.R,d=e.D,u=e.c,s=e.a5,b=e.U}],execute:function(){var v=e("c",{name:l,shape:n("round"),disabled:Boolean,iconSize:i,modelValue:l,checkedColor:String,labelPosition:String,labelDisabled:Boolean});e("s",a({props:o({},v,{bem:c(Function),role:String,parent:Object,checked:Boolean,bindGroup:t}),emits:["click","toggle"],setup:function(e,l){var n=l.emit,i=l.slots,a=r(),o=function(l){if(e.parent&&e.bindGroup)return e.parent.props[l]},c=d((function(){return o("disabled")||e.disabled})),t=d((function(){return o("direction")})),v=d((function(){var l=e.checkedColor||o("checkedColor");if(l&&e.checked&&!c.value)return{borderColor:l,backgroundColor:l}})),f=function(l){var i=l.target,o=a.value,t=o===i||(null==o?void 0:o.contains(i));c.value||!t&&e.labelDisabled||n("toggle"),n("click",l)},k=function(){var l=e.bem,n=e.shape,t=e.checked,r=e.iconSize||o("iconSize");return u("div",{ref:a,class:l("icon",[n,{disabled:c.value,checked:t}]),style:{fontSize:b(r)}},[i.icon?i.icon({checked:t,disabled:c.value}):u(s,{name:"success",style:v.value},null)])},p=function(){if(i.default)return u("span",{class:e.bem("label",[e.labelPosition,{disabled:c.value}])},[i.default()])};return function(){var l="left"===e.labelPosition?[p(),k()]:[k(),p()];return u("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},[l])}}}))}}}));
