import{defineProperty as e}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as r}from"react/jsx-runtime";import a from"classnames";import{noop as i}from"lodash-es";import{Switch as o}from"../Switch/Switch.js";import{MockToggle as t}from"./MockToggle.js";import{BEMClass as s}from"../../helpers/bem-helper.js";import{backwardCompatibilityForProperties as l}from"../../helpers/backwardCompatibilityForProperties.js";import{BASE_TOGGLE_CLASS_NAME as m}from"./ToggleConstants.js";import"./Toggle.scss.js";var n=s(m),d=function(s){var m=s.id,d=s.isDefaultSelected,p=void 0===d||d,c=s.isSelected,f=s.onChange,v=void 0===f?i:f,b=s.value,h=s.name,u=s.disabled,g=s.isDisabled,C=s.ariaLabel,j=s.ariaControls,w=s.onOverrideText,T=void 0===w?"Switch on":w,k=s.offOverrideText,x=void 0===k?"Switch off":k,S=s.size,N=void 0===S?"large":S,O=s.label,_=void 0!==O&&O,y=s.kind,P=void 0===y?"primary":y,z=l([s.className,s.componentClassName]),D=l([u,g],!1),L=a(n({element:"wrapper"}),e({},n({element:"wrapper",state:"disabled"}),D),n({element:"size_".concat(N)}),n({element:"kind_".concat(P)})),B=n({element:"input"});return r(o,Object.assign({defaultChecked:p,checked:c,id:m,wrapperClassName:L,onChange:v,value:b,name:h,disabled:D,ariaLabel:C,ariaControls:j,inputClassName:B},{children:r(t,{offOverrideText:x,className:z,onOverrideText:T,label:_})}))};export{d as default};
