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