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