import{aI as Q,aH as Z,aJ as U,ad as Y,aM as p,aK as q,r as $,aO as A,b$ as ee,bZ as oe,j as t,aP as J,aL as S,aQ as K,a2 as W,bo as ae,aN as ne,g as te,m as re,i as n,I as N,aB as ce,E as ie,A as k,at as le}from"./index-DnB1XXdB.js";function se(o){return Q("PrivateSwitchBase",o)}Z("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const de=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],he=o=>{const{classes:a,checked:e,disabled:i,edge:c}=o,l={root:["root",e&&"checked",i&&"disabled",c&&`edge${S(c)}`],input:["input"]};return K(l,se,a)},ue=U(Y)(({ownerState:o})=>p({padding:9,borderRadius:"50%"},o.edge==="start"&&{marginLeft:o.size==="small"?-3:-12},o.edge==="end"&&{marginRight:o.size==="small"?-3:-12})),pe=U("input",{shouldForwardProp:q})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Ce=$.forwardRef(function(a,e){const{autoFocus:i,checked:c,checkedIcon:l,className:g,defaultChecked:C,disabled:v,disableFocusRipple:s=!1,edge:r=!1,icon:B,id:x,inputProps:I,inputRef:j,name:y,onBlur:f,onChange:m,onFocus:b,readOnly:H,required:M=!1,tabIndex:L,type:d,value:R}=a,F=A(a,de),[w,P]=ee({controlled:c,default:!!C,name:"SwitchBase",state:"checked"}),h=oe(),O=u=>{b&&b(u),h&&h.onFocus&&h.onFocus(u)},T=u=>{f&&f(u),h&&h.onBlur&&h.onBlur(u)},G=u=>{if(u.nativeEvent.defaultPrevented)return;const D=u.target.checked;P(D),m&&m(u,D)};let z=v;h&&typeof z>"u"&&(z=h.disabled);const X=d==="checkbox"||d==="radio",E=p({},a,{checked:w,disabled:z,disableFocusRipple:s,edge:r}),V=he(E);return t.jsxs(ue,p({component:"span",className:J(V.root,g),centerRipple:!0,focusRipple:!s,disabled:z,tabIndex:null,role:void 0,onFocus:O,onBlur:T,ownerState:E,ref:e},F,{children:[t.jsx(pe,p({autoFocus:i,checked:c,defaultChecked:C,className:V.input,disabled:z,id:X?x:void 0,name:y,onChange:G,readOnly:H,ref:j,required:M,ownerState:E,tabIndex:L,type:d},d==="checkbox"&&R===void 0?{}:{value:R},I)),w?l:B]}))}),be=W(t.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),ke=W(t.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),ge=W(t.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function xe(o){return Q("MuiCheckbox",o)}const _=Z("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),fe=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],me=o=>{const{classes:a,indeterminate:e,color:i,size:c}=o,l={root:["root",e&&"indeterminate",`color${S(i)}`,`size${S(c)}`]},g=K(l,xe,a);return p({},a,g)},ye=U(Ce,{shouldForwardProp:o=>q(o)||o==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(o,a)=>{const{ownerState:e}=o;return[a.root,e.indeterminate&&a.indeterminate,a[`size${S(e.size)}`],e.color!=="default"&&a[`color${S(e.color)}`]]}})(({theme:o,ownerState:a})=>p({color:(o.vars||o).palette.text.secondary},!a.disableRipple&&{"&:hover":{backgroundColor:o.vars?`rgba(${a.color==="default"?o.vars.palette.action.activeChannel:o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:ae(a.color==="default"?o.palette.action.active:o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},a.color!=="default"&&{[`&.${_.checked}, &.${_.indeterminate}`]:{color:(o.vars||o).palette[a.color].main},[`&.${_.disabled}`]:{color:(o.vars||o).palette.action.disabled}})),$e=t.jsx(ke,{}),ve=t.jsx(be,{}),Be=t.jsx(ge,{}),Ie=$.forwardRef(function(a,e){var i,c;const l=ne({props:a,name:"MuiCheckbox"}),{checkedIcon:g=$e,color:C="primary",icon:v=ve,indeterminate:s=!1,indeterminateIcon:r=Be,inputProps:B,size:x="medium",className:I}=l,j=A(l,fe),y=s?r:v,f=s?r:g,m=p({},l,{color:C,indeterminate:s,size:x}),b=me(m);return t.jsx(ye,p({type:"checkbox",inputProps:p({"data-indeterminate":s},B),icon:$.cloneElement(y,{fontSize:(i=y.props.fontSize)!=null?i:x}),checkedIcon:$.cloneElement(f,{fontSize:(c=f.props.fontSize)!=null?c:x}),ownerState:m,ref:e,className:J(b.root,I)},j,{classes:b}))});function je(o,a){return t.jsx(te,{ref:a,icon:{parts:[{type:"circle",props:{cx:"7",cy:"7",r:"7",fill:"currentColor"}},{type:"path",props:{d:"M5 3.79675C5.1176 3.68835 5.24557 3.58537 5.38392 3.4878C5.52572 3.39024 5.67791 3.30533 5.84047 3.23306C6.00303 3.16079 6.17942 3.10479 6.36965 3.06504C6.55988 3.02168 6.76567 3 6.98703 3C7.28794 3 7.56118 3.04336 7.80674 3.13008C8.05577 3.2168 8.26848 3.34146 8.44488 3.50406C8.62127 3.66305 8.75789 3.85637 8.85473 4.08401C8.95158 4.31165 9 4.5664 9 4.84824C9 5.12285 8.96195 5.36134 8.88586 5.56369C8.80977 5.76242 8.71293 5.93586 8.59533 6.08401C8.48119 6.23216 8.35668 6.36043 8.22179 6.46883C8.0869 6.57724 7.95893 6.68022 7.83787 6.77778C7.71682 6.87173 7.61133 6.96567 7.5214 7.05962C7.43493 7.14995 7.38305 7.25294 7.36576 7.36856L7.24643 8.15989H6.36965L6.28145 7.27642C6.27799 7.25836 6.27626 7.2439 6.27626 7.23306C6.27626 7.21861 6.27626 7.20235 6.27626 7.18428C6.27626 7.02529 6.31431 6.88799 6.3904 6.77236C6.46649 6.65312 6.56161 6.54291 6.67575 6.44173C6.78988 6.33695 6.91267 6.23577 7.0441 6.13821C7.17553 6.04065 7.29831 5.93586 7.41245 5.82385C7.52659 5.70822 7.6217 5.57814 7.6978 5.4336C7.77389 5.28907 7.81193 5.11924 7.81193 4.92412C7.81193 4.79404 7.78772 4.67841 7.7393 4.57724C7.69434 4.47245 7.63035 4.38392 7.54734 4.31165C7.46433 4.23577 7.36403 4.17796 7.24643 4.13821C7.1323 4.09846 7.00778 4.07859 6.87289 4.07859C6.67575 4.07859 6.508 4.10208 6.36965 4.14905C6.23476 4.19241 6.11889 4.243 6.02205 4.30081C5.92866 4.35501 5.84911 4.4056 5.7834 4.45257C5.71768 4.49593 5.65888 4.51762 5.607 4.51762C5.48249 4.51762 5.39256 4.46341 5.33722 4.35501L5 3.79675ZM5.98054 10.187C5.98054 10.075 5.99957 9.96838 6.03761 9.86721C6.07912 9.76603 6.13446 9.67931 6.20363 9.60705C6.27626 9.53478 6.361 9.47696 6.45785 9.4336C6.55469 9.39024 6.65845 9.36856 6.76913 9.36856C6.87635 9.36856 6.97838 9.39024 7.07523 9.4336C7.17207 9.47696 7.25508 9.53478 7.32425 9.60705C7.39343 9.67931 7.44877 9.76603 7.49027 9.86721C7.53178 9.96838 7.55253 10.075 7.55253 10.187C7.55253 10.3026 7.53178 10.411 7.49027 10.5122C7.44877 10.6098 7.39343 10.6947 7.32425 10.7669C7.25508 10.8392 7.17207 10.8952 7.07523 10.935C6.97838 10.9783 6.87635 11 6.76913 11C6.65845 11 6.55469 10.9783 6.45785 10.935C6.361 10.8952 6.27626 10.8392 6.20363 10.7669C6.13446 10.6947 6.07912 10.6098 6.03761 10.5122C5.99957 10.411 5.98054 10.3026 5.98054 10.187Z",fill:"white"}}],viewSize:14},...o})}const we=$.forwardRef(je),ze=re((o,a,e)=>({wrapper:{alignItems:"center",display:"inline-flex",[`&.${e.background}`]:{backgroundColor:n.secondary.lightBlue,borderRadius:4,height:48,padding:"0 11px 0 2px",boxSizing:"border-box"},[`&.${e.fullBackground}`]:{display:"flex",height:56,width:"100%"},[`&.${e.center}`]:{display:"flex",justifyContent:"center"},[`&:hover .${e.root}:not(.${e.checked}) .${e.checkbox}:not(.${e.disabled}), &:active .${e.root}:not(.${e.checked}):not(.${e.disabled}) .${e.checkbox}`]:{borderColor:n.gray.darkest,"@media (hover: none)":{borderColor:n.gray.dark}},[`&:hover .${e.root}.${e.checked}:not(.${e.disabled}) .${e.checkbox}`]:{borderColor:n.primary.darkBlue,backgroundColor:n.primary.darkBlue,"@media (hover: none)":{borderColor:n.primary.blue}},[`&:active .${e.root}.${e.checked}:not(.${e.disabled}) .${e.checkbox}`]:{borderColor:n.primary.darkBlue,backgroundColor:n.primary.darkBlue},[`&:hover .${e.label}:not(.${e.disabled})`]:{color:n.black,"@media (hover: none)":{color:n.gray.darkest}},[`&:active .${e.label}:not(.${e.disabled})`]:{color:n.black}},labelWrapper:{alignItems:"center",display:"inline-flex",justifyContent:"center",cursor:"pointer",[`&.${e.disabled}`]:{cursor:"default"}},checkbox:{width:24,height:24,border:`2px solid ${n.gray.dark}`,flexShrink:0,transition:N.transition(),...N.centerFlex},label:{color:n.gray.darkest,fontFamily:o.typography.fontFamily,fontSize:13,fontWeight:600,lineHeight:"18px",userSelect:"none",transition:N.transition("color"),whiteSpace:"normal",marginLeft:8,".hintText &":{marginRight:5},[`&.${e.disabled}`]:{color:n.gray.dark}},center:{},background:{},fullBackground:{},small:{},root:{[`&.${e.small}`]:{height:20,width:20,[`& .${e.checkbox}`]:{width:20,height:20}},[`& .${e.checkbox}`]:{backgroundColor:n.white,borderRadius:8},"&:hover":{backgroundColor:"transparent",color:n.gray.dark,"@media (hover: none)":{color:n.gray.normal}},"&:active":{backgroundColor:"transparent"},[`&.${e.checked} .${e.checkbox}`]:{borderColor:n.primary.blue,backgroundColor:n.primary.blue,"& svg .check":{fill:n.white}},[`&.${e.disabled} .${e.checkbox}`]:{borderColor:n.secondary.lightBlue,backgroundColor:n.secondary.lightBlue,[`.${e.background} &`]:{borderColor:n.gray.dark,backgroundColor:n.gray.dark}}},checked:{},disabled:{pointerEvents:"none"},switchRoot:{display:"flex",alignItems:"center"},hintIcon:{marginLeft:3,color:n.gray.darkest,cursor:"pointer",transition:N.transition(),[o.breakpoints.up("md")]:{"&:hover":{color:n.black}},"&.openHint":{color:n.black}},light:{fontWeight:400,fontSize:13,color:n.black}}),"Checkbox");function Se(o){return t.jsx(ce,{...o,children:t.jsx("polygon",{className:"check",points:"10 17.41 5.29 12.71 6.71 11.29 10 14.59 17.29 7.29 18.71 8.71 10 17.41"})})}function Fe({background:o=!1,fullBackground:a=!1,center:e=!1,label:i="",small:c=!1,style:l={},className:g="",hintText:C="",lightLabel:v=!1,CheckComponent:s,...r}){const{wrapper:B,center:x,background:I,fullBackground:j,label:y,labelWrapper:f,small:m,checkbox:b,hintIcon:H,switchRoot:M,light:L,...d}=ze({...r,classes:r.classes||{}}),R=ie("lgDown"),[F,w]=$.useState(!1),P=()=>w(!0),h=()=>w(!1);return s=s||Se,t.jsx("div",{className:k([M,{hintText:!!C}]),children:t.jsxs("div",{className:k(["checkbox-wrapper",g,B],{[x]:e,[I]:o||a,[j]:a}),children:[t.jsxs("label",{className:k([f],{[d.disabled]:r.disabled}),htmlFor:r.id,style:l,children:[t.jsx(Ie,{...r,disableRipple:!0,classes:{...d,root:k(d.root,{[m]:c})},icon:t.jsx("div",{className:k(b,{[d.disabled]:r.disabled})}),checkedIcon:t.jsx("div",{className:k(b,{[d.disabled]:r.disabled}),children:t.jsx(s,{})})}),!!i&&t.jsx("span",{className:k(y,{[d.disabled]:r.disabled,[L]:v}),children:i})]}),C&&t.jsx(le,{title:C,open:F,onOpen:P,onClose:h,children:t.jsx(we,{className:k([H,{openHint:F}]),size:14,onClick:O=>{O.stopPropagation(),R&&P()}})})]})})}export{Fe as C,Ce as S,we as a,ze as u};