import{A as e,E as t,O as a,S as o,W as r,_t as s,gt as i,lt as n,mt as l,pt as c,x as d,yt as p}from"./render-cqdoDfd9.js";import{n as h}from"./Paper-DtiadJnq.js";import{t as m}from"./SwitchBase-CiaJBIGW.js";function u(e){return l("MuiSwitch",e)}var w=r("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),g=p(s()),v=n(),b=e("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,a)=>{const{ownerState:o}=e;return[a.root,o.edge&&a[`edge${t(o.edge)}`],a[`size${t(o.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${w.thumb}`]:{width:16,height:16},[`& .${w.switchBase}`]:{padding:4,[`&.${w.checked}`]:{transform:"translateX(16px)"}}}}]}),k=e(m,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,a)=>{const{ownerState:o}=e;return[a.switchBase,{[`& .${w.input}`]:a.input},"default"!==o.color&&a[`color${t(o.color)}`]]}})(o(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${w.checked}`]:{transform:"translateX(20px)"},[`&.${w.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${w.checked} + .${w.track}`]:{opacity:.5},[`&.${w.disabled} + .${w.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${w.input}`]:{left:"-100%",width:"300%"}})),o(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(d(["light"])).map(([t])=>({props:{color:t},style:{[`&.${w.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${w.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${w.checked} + .${w.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),y=e("span",{name:"MuiSwitch",slot:"Track"})(o(({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)}))),f=e("span",{name:"MuiSwitch",slot:"Thumb"})(o(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),$=g.forwardRef(function(e,o){const r=a({props:e,name:"MuiSwitch"}),{className:s,color:n="primary",edge:l=!1,size:d="medium",sx:p,slots:m={},slotProps:w={},...g}=r,$={...r,color:n,edge:l,size:d},S=(e=>{const{classes:a,edge:o,size:r,color:s,checked:i,disabled:n}=e,l=c({root:["root",o&&`edge${t(o)}`,`size${t(r)}`],switchBase:["switchBase",`color${t(s)}`,i&&"checked",n&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u,a);return{...a,...l}})($),x={slots:m,slotProps:w},[B,z]=h("root",{className:i(S.root,s),elementType:b,externalForwardedProps:x,ownerState:$,additionalProps:{sx:p}}),[C,j]=h("thumb",{className:S.thumb,elementType:f,externalForwardedProps:x,ownerState:$}),P=(0,v.jsx)(C,{...j}),[M,R]=h("track",{className:S.track,elementType:y,externalForwardedProps:x,ownerState:$});return(0,v.jsxs)(B,{...z,children:[(0,v.jsx)(k,{type:"checkbox",icon:P,checkedIcon:P,ref:o,ownerState:$,...g,classes:{...S,root:S.switchBase},slots:{...m.switchBase&&{root:m.switchBase},...m.input&&{input:m.input}},slotProps:{...w.switchBase&&{root:"function"==typeof w.switchBase?w.switchBase($):w.switchBase},input:{role:"switch"},...w.input&&{input:"function"==typeof w.input?w.input($):w.input}}}),(0,v.jsx)(M,{...R})]})});export{$ as t};