import{j as r,g as Q,b as X,s as Y,r as Z,c as h,m as ee,f as oe,_ as re,h as ce,i as te,N as U,F as S}from"./styled-6f3628cf.js";import{r as V,a as D}from"./jsx-runtime_commonjs-proxy-c27fb445.js";import{_ as i}from"./emotion-use-insertion-effect-with-fallbacks.browser.esm-e1338cfd.js";import{r as f}from"./index-8ee6c85d.js";import{S as ae}from"./SwitchBase-15f0023c.js";import{c as b}from"./createSvgIcon-5d5e4387.js";import{F as ne}from"./FormControlLabel-c60d6416.js";const se=b(r("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"),le=b(r("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"),ie=b(r("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 de(e){return X("MuiCheckbox",e)}const pe=Q("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),v=pe,ue=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],me=e=>{const{classes:o,indeterminate:c,color:p,size:u}=e,t={root:["root",c&&"indeterminate",`color${h(p)}`,`size${h(u)}`]},C=te(t,de,o);return i({},o,C)},he=Y(ae,{shouldForwardProp:e=>Z(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:c}=e;return[o.root,c.indeterminate&&o.indeterminate,o[`size${h(c.size)}`],c.color!=="default"&&o[`color${h(c.color)}`]]}})(({theme:e,ownerState:o})=>i({color:(e.vars||e).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${o.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ee(o.color==="default"?e.palette.action.active:e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},o.color!=="default"&&{[`&.${v.checked}, &.${v.indeterminate}`]:{color:(e.vars||e).palette[o.color].main},[`&.${v.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),Ce=r(le,{}),ke=r(se,{}),fe=r(ie,{}),ve=f.forwardRef(function(o,c){var p,u;const t=oe({props:o,name:"MuiCheckbox"}),{checkedIcon:C=Ce,color:W="primary",icon:A=ke,indeterminate:m=!1,indeterminateIcon:g=fe,inputProps:G,size:k="medium",className:J}=t,K=re(t,ue),_=m?g:A,z=m?g:C,$=i({},t,{color:W,indeterminate:m,size:k}),y=me($);return r(he,i({type:"checkbox",inputProps:i({"data-indeterminate":m},G),icon:f.cloneElement(_,{fontSize:(p=_.props.fontSize)!=null?p:k}),checkedIcon:f.cloneElement(z,{fontSize:(u=z.props.fontSize)!=null?u:k}),ownerState:$,ref:c,className:ce(y.root,J)},K,{classes:y}))}),d=ve;var x={},be=U;Object.defineProperty(x,"__esModule",{value:!0});var T=x.default=void 0,xe=be(V()),Ie=D;T=x.default=(0,xe.default)((0,Ie.jsx)("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05"}),"FavoriteBorder");var I={},ge=U;Object.defineProperty(I,"__esModule",{value:!0});var w=I.default=void 0,_e=ge(V()),ze=D;w=I.default=(0,_e.default)((0,ze.jsx)("path",{d:"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z"}),"Favorite");const $e={title:"Inputs/Checkbox",component:d,parameters:{layout:"centered",controls:{exclude:["icon","checkedIcon","checked"]}},decorators:[],argTypes:{defaultChecked:{control:"boolean"},disabled:{control:"boolean"},color:{control:"select",options:["inherit","primary","secondary","success","error","info","warning"]},size:{control:"select",options:["small","medium","large"]}},args:{defaultChecked:!0,disabled:!1,color:"primary",size:"medium"}},a={render:({...e})=>r(d,{...e})},n={render:({...e})=>r(d,{icon:r(S,{}),checkedIcon:r(S,{}),...e}),args:{defaultChecked:!1,icon:r(T,{}),checkedIcon:r(w,{})}},s={render:({checked:e,...o})=>r(ne,{control:r(d,{defaultChecked:!0}),label:"Label"})},l={render:({checked:e,...o})=>r(d,{checked:e,onChange:()=>{},...o}),args:{checked:!0}};var B,F,P;a.parameters={...a.parameters,docs:{...(B=a.parameters)==null?void 0:B.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <Checkbox {...props} />;
  }
}`,...(P=(F=a.parameters)==null?void 0:F.docs)==null?void 0:P.source}}};var M,j,L;n.parameters={...n.parameters,docs:{...(M=n.parameters)==null?void 0:M.docs,source:{originalSource:`{
  render: ({
    ...props
  }) => {
    return <Checkbox icon={<></>} checkedIcon={<></>} {...props} />;
  },
  args: {
    defaultChecked: false,
    icon: <FavoriteBorder />,
    checkedIcon: <Favorite />
  }
}`,...(L=(j=n.parameters)==null?void 0:j.docs)==null?void 0:L.source}}};var R,O,q;s.parameters={...s.parameters,docs:{...(R=s.parameters)==null?void 0:R.docs,source:{originalSource:`{
  render: ({
    checked,
    ...props
  }) => {
    return <FormControlLabel control={<Checkbox defaultChecked />} label="Label" />;
  }
}`,...(q=(O=s.parameters)==null?void 0:O.docs)==null?void 0:q.source}}};var E,H,N;l.parameters={...l.parameters,docs:{...(E=l.parameters)==null?void 0:E.docs,source:{originalSource:`{
  render: ({
    checked,
    ...props
  }) => {
    return <Checkbox checked={checked} onChange={() => {}} {...props} />;
  },
  args: {
    checked: true
  }
}`,...(N=(H=l.parameters)==null?void 0:H.docs)==null?void 0:N.source}}};const ye=["Basic","CustomIcon","Label","Controlled"],Re=Object.freeze(Object.defineProperty({__proto__:null,Basic:a,Controlled:l,CustomIcon:n,Label:s,__namedExportsOrder:ye,default:$e},Symbol.toStringTag,{value:"Module"}));export{a as B,d as C,Re as a};
