System.register(["./index-legacy.c77ea834.js"],(function(e){"use strict";var l,n,i,a,o,c,t,r,u,d,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,u=e.D,d=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=u((function(){return o("disabled")||e.disabled})),t=u((function(){return o("direction")})),v=u((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 d("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}):d(s,{name:"success",style:v.value},null)])},p=function(){if(i.default)return d("span",{class:e.bem("label",[e.labelPosition,{disabled:c.value}])},[i.default()])};return function(){var l="left"===e.labelPosition?[p(),k()]:[k(),p()];return d("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])}}}))}}}));
