import e from"../../_util/cssinjs/Keyframes.mjs";import{genFocusOutline as t,resetComponent as n}from"../../style/index.mjs";import r from"../../theme/util/genComponentStyleHook.mjs";import{merge as i}from"../../theme/util/statistic.mjs";var a=new e(`antCheckboxEffect`,{"0%":{transform:`scale(1)`,opacity:.5},"100%":{transform:`scale(1.6)`,opacity:0}}),o=e=>{let{checkboxCls:r}=e,i=`${r}-wrapper`;return[{[`${r}-group`]:{...n(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...n(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[r]:{...n(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,[`${r}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0,margin:0,[`&:focus-visible + ${r}-inner`]:{...t(e)}},[`${r}-inner`]:{boxSizing:`border-box`,position:`relative`,top:0,insetInlineStart:0,display:`block`,width:e.checkboxSize,height:e.checkboxSize,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:`border-box`,position:`absolute`,top:`50%`,insetInlineStart:`21.5%`,display:`table`,width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[r]:{"&-indeterminate":{[`${r}-inner`]:{"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`}}}}},{[`${i}:hover ${r}:after`]:{visibility:`visible`},[`
        ${i}:not(${i}-disabled),
        ${r}:not(${r}-disabled)
      `]:{[`&:hover ${r}-inner`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${r}-checked:not(${r}-disabled) ${r}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`},[`&:hover ${r}-checked:not(${r}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${r}-checked`]:{[`${r}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}},"&:after":{position:`absolute`,top:0,insetInlineStart:0,width:`100%`,height:`100%`,borderRadius:e.borderRadiusSM,visibility:`hidden`,border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:a,animationDuration:e.motionDurationSlow,animationTimingFunction:`ease-in-out`,animationFillMode:`backwards`,content:`""`,transition:`all ${e.motionDurationSlow}`}},[`
        ${i}-checked:not(${i}-disabled),
        ${r}-checked:not(${r}-disabled)
      `]:{[`&:hover ${r}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`},[`&:hover ${r}:after`]:{borderColor:e.colorPrimaryHover}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${r}-disabled`]:{[`&, ${r}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},[`${r}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:`none`},"& + span":{color:e.colorTextDisabled},[`&${r}-indeterminate ${r}-inner::after`]:{background:e.colorTextDisabled}}}]};function s(e,t){return[o(i(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))]}var c=r(`Checkbox`,(e,{prefixCls:t})=>[s(t,e)]);export{c as default,o as genCheckboxStyle,s as getStyle};