1import{n as G}from"./rolldown-runtime-xSXa1GVp.js";import{$ as k,D as J,Ft as K,Ht as V,Q as W,_t as X,et as Y,gt as Z,k as C,st as ee}from"./useTranslation-BKyj-ZDP.js";import{a as te,l as oe}from"./FormLabel-C0i9JB8Y.js";var se=G(V());function ae(o){return X("PrivateSwitchBase",o)}var ue=Z("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]),F=K(),re=o=>{const{classes:s,checked:l,disabled:d,edge:r}=o;return ee({root:["root",l&&"checked",d&&"disabled",r&&`edge${W(r)}`],input:["input"]},ae,s)},ie=k(J,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:o,ownerState:s})=>o==="start"&&s.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:o,ownerState:s})=>o==="end"&&s.size!=="small",style:{marginRight:-12}}]}),ne=k("input",{name:"MuiSwitchBase",shouldForwardProp:Y})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),pe=se.forwardRef(function(s,l){const{autoFocus:d,checked:r,checkedIcon:b,defaultChecked:u,disabled:y,disableFocusRipple:p=!1,edge:x=!1,icon:_,id:v,inputProps:R,inputRef:I,name:z,onBlur:h,onChange:m,onFocus:f,readOnly:g,required:j=!1,tabIndex:U,type:i,value:S,slots:q={},slotProps:E={},...L}=s,[w,M]=oe({controlled:r,default:!!u,name:"SwitchBase",state:"checked"}),a=te(),N=e=>{f&&f(e),a&&a.onFocus&&a.onFocus(e)},T=e=>{h&&h(e),a&&a.onBlur&&a.onBlur(e)},$=e=>{if(e.nativeEvent.defaultPrevented||g)return;const t=e.target.checked;M(t),m&&m(e,t)};let n=y;a&&typeof n>"u"&&(n=a.disabled);const D=i==="checkbox"||i==="radio",c={...s,checked:w,disabled:n,disableFocusRipple:p,edge:x},B=re(c),P={slots:q,slotProps:{input:R,...E}},[H,O]=C("root",{ref:l,elementType:ie,className:B.root,shouldForwardComponentProp:!0,externalForwardedProps:{...P,component:"span",...L},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),N(t)},onBlur:t=>{e.onBlur?.(t),T(t)}}),ownerState:c,additionalProps:{centerRipple:!0,focusRipple:!p,role:void 0,tabIndex:null}}),[Q,A]=C("input",{ref:I,elementType:ne,className:B.input,externalForwardedProps:P,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),$(t)}}),ownerState:c,additionalProps:{autoFocus:d,checked:r,defaultChecked:u,disabled:n,id:D?v:void 0,name:z,readOnly:g,required:j,tabIndex:U,type:i,...i==="checkbox"&&S===void 0?{}:{value:S}}});return(0,F.jsxs)(H,{...O,children:[(0,F.jsx)(Q,{...A}),w?b:_]})});export{pe as t}; 2 3//# sourceMappingURL=SwitchBase-DxVSk0ct.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.