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(`antRadioEffect`,{"0%":{transform:`scale(1)`,opacity:.5},"100%":{transform:`scale(1.6)`,opacity:0}}),o=e=>{let{componentCls:t,antCls:r}=e,i=`${t}-group`;return{[i]:{...n(e),display:`inline-block`,fontSize:0,[`&${i}-rtl`]:{direction:`rtl`},[`${r}-badge ${r}-badge-count`]:{zIndex:1},[`> ${r}-badge:not(:first-child) > ${r}-button-wrapper`]:{borderInlineStart:`none`}}}},s=e=>{let{componentCls:r,radioWrapperMarginRight:i,radioCheckedColor:o,radioSize:s,motionDurationSlow:c,motionDurationMid:l,motionEaseInOut:u,motionEaseInOutCirc:d,radioButtonBg:f,colorBorder:p,lineWidth:m,radioDotSize:h,colorBgContainerDisabled:g,colorTextDisabled:_,paddingXS:v,radioDotDisabledColor:y,lineType:b,radioDotDisabledSize:x,wireframe:S,colorWhite:C}=e,w=`${r}-inner`;return{[`${r}-wrapper`]:{...n(e),position:`relative`,display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:i,cursor:`pointer`,[`&${r}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},[`${r}-checked::after`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:`100%`,height:`100%`,border:`${m}px ${b} ${o}`,borderRadius:`50%`,visibility:`hidden`,animationName:a,animationDuration:c,animationTimingFunction:u,animationFillMode:`both`,content:`""`},[r]:{...n(e),position:`relative`,display:`inline-block`,outline:`none`,cursor:`pointer`,alignSelf:`center`},[`${r}-wrapper:hover &,
        &:hover ${w}`]:{borderColor:o},[`${r}-input:focus-visible + ${w}`]:{...t(e)},[`${r}:hover::after, ${r}-wrapper:hover &::after`]:{visibility:`visible`},[`${r}-inner`]:{"&::after":{boxSizing:`border-box`,position:`absolute`,insetBlockStart:`50%`,insetInlineStart:`50%`,display:`block`,width:s,height:s,marginBlockStart:s/-2,marginInlineStart:s/-2,backgroundColor:S?o:C,borderBlockStart:0,borderInlineStart:0,borderRadius:s,transform:`scale(0)`,opacity:0,transition:`all ${c} ${d}`,content:`""`},boxSizing:`border-box`,position:`relative`,insetBlockStart:0,insetInlineStart:0,display:`block`,width:s,height:s,backgroundColor:f,borderColor:p,borderStyle:`solid`,borderWidth:m,borderRadius:`50%`,transition:`all ${l}`},[`${r}-input`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:`pointer`,opacity:0},[`${r}-checked`]:{[w]:{borderColor:o,backgroundColor:S?f:o,"&::after":{transform:`scale(${h/s})`,opacity:1,transition:`all ${c} ${d}`}}},[`${r}-disabled`]:{cursor:`not-allowed`,[w]:{backgroundColor:g,borderColor:p,cursor:`not-allowed`,"&::after":{backgroundColor:y}},[`${r}-input`]:{cursor:`not-allowed`},[`${r}-disabled + span`]:{color:_,cursor:`not-allowed`},[`&${r}-checked`]:{[w]:{"&::after":{transform:`scale(${x/s})`}}}},[`span${r} + *`]:{paddingInlineStart:v,paddingInlineEnd:v}}}},c=e=>{let{radioButtonColor:n,controlHeight:r,componentCls:i,lineWidth:a,lineType:o,colorBorder:s,motionDurationSlow:c,motionDurationMid:l,radioButtonPaddingHorizontal:u,fontSize:d,radioButtonBg:f,fontSizeLG:p,controlHeightLG:m,controlHeightSM:h,paddingXS:g,borderRadius:_,borderRadiusSM:v,borderRadiusLG:y,radioCheckedColor:b,radioButtonCheckedBg:x,radioButtonHoverColor:S,radioButtonActiveColor:C,radioSolidCheckedColor:w,colorTextDisabled:T,colorBgContainerDisabled:E,radioDisabledButtonCheckedColor:D,radioDisabledButtonCheckedBg:O}=e;return{[`${i}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:r,margin:0,paddingInline:u,paddingBlock:0,color:n,fontSize:d,lineHeight:`${r-a*2}px`,background:f,border:`${a}px ${o} ${s}`,borderBlockStartWidth:a+.02,borderInlineStartWidth:0,borderInlineEndWidth:a,cursor:`pointer`,transition:[`color ${l}`,`background ${l}`,`border-color ${l}`,`box-shadow ${l}`].join(`,`),a:{color:n},[`> ${i}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:first-child)":{"&::before":{position:`absolute`,insetBlockStart:-a,insetInlineStart:-a,display:`block`,boxSizing:`content-box`,width:1,height:`100%`,paddingBlock:a,paddingInline:0,backgroundColor:s,transition:`background-color ${c}`,content:`""`}},"&:first-child":{borderInlineStart:`${a}px ${o} ${s}`,borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_},"&:first-child:last-child":{borderRadius:_},[`${i}-group-large &`]:{height:m,fontSize:p,lineHeight:`${m-a*2}px`,"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},[`${i}-group-small &`]:{height:h,paddingInline:g-a,paddingBlock:0,lineHeight:`${h-a*2}px`,"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},"&:hover":{position:`relative`,color:b},"&:has(:focus-visible)":{...t(e)},[`${i}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${i}-button-wrapper-disabled)`]:{zIndex:1,color:b,background:x,borderColor:b,"&::before":{backgroundColor:b},"&:first-child":{borderColor:b},"&:hover":{color:S,borderColor:S,"&::before":{backgroundColor:S}},"&:active":{color:C,borderColor:C,"&::before":{backgroundColor:C}}},[`${i}-group-solid &-checked:not(${i}-button-wrapper-disabled)`]:{color:w,background:b,borderColor:b,"&:hover":{color:w,background:S,borderColor:S},"&:active":{color:w,background:C,borderColor:C}},"&-disabled":{color:T,backgroundColor:E,borderColor:s,cursor:`not-allowed`,"&:first-child, &:hover":{color:T,backgroundColor:E,borderColor:s}},[`&-disabled${i}-button-wrapper-checked`]:{color:D,backgroundColor:O,borderColor:s,boxShadow:`none`}}}},l=r(`Radio`,e=>{let{padding:t,lineWidth:n,controlItemBgActiveDisabled:r,colorTextDisabled:a,colorBgContainer:l,fontSizeLG:u,controlOutline:d,colorPrimaryHover:f,colorPrimaryActive:p,colorText:m,colorPrimary:h,marginXS:g,controlOutlineWidth:_,colorTextLightSolid:v,wireframe:y}=e,b=`0 0 0 ${_}px ${d}`,x=b,S=u,C=S-8,w=i(e,{radioFocusShadow:b,radioButtonFocusShadow:x,radioSize:S,radioDotSize:y?C:S-(4+n)*2,radioDotDisabledSize:C,radioCheckedColor:h,radioDotDisabledColor:a,radioSolidCheckedColor:v,radioButtonBg:l,radioButtonCheckedBg:l,radioButtonColor:m,radioButtonHoverColor:f,radioButtonActiveColor:p,radioButtonPaddingHorizontal:t-n,radioDisabledButtonCheckedBg:r,radioDisabledButtonCheckedColor:a,radioWrapperMarginRight:g});return[o(w),s(w),c(w)]});export{l as default};