import{resetComponent as e,resetIcon as t}from"../../style/index.mjs";import n from"../../theme/util/genComponentStyleHook.mjs";import{genCompactItemStyle as r}from"../../style/compact-item.mjs";import{genActiveStyle as i,genBasicInputStyle as a,genDisabledStyle as o,genHoverStyle as s,genInputGroupStyle as c,genPlaceholderStyle as l,genStatusStyle as u,initInputToken as d}from"../../input/style/index.mjs";var f=n=>{let{componentCls:r,lineWidth:d,lineType:f,colorBorder:p,borderRadius:m,fontSizeLG:h,controlHeightLG:g,controlHeightSM:_,colorError:v,inputPaddingHorizontalSM:y,colorTextDescription:b,motionDurationMid:x,colorPrimary:S,controlHeight:C,inputPaddingHorizontal:w,colorBgContainer:T,colorTextDisabled:E,borderRadiusSM:D,borderRadiusLG:O,controlWidth:k,handleVisible:A}=n;return[{[r]:{...e(n),...a(n),...u(n,r),display:`inline-block`,width:k,margin:0,padding:0,border:`${d}px ${f} ${p}`,borderRadius:m,"&-rtl":{direction:`rtl`,[`${r}-input`]:{direction:`rtl`}},"&-lg":{padding:0,fontSize:h,borderRadius:O,[`input${r}-input`]:{height:g-2*d}},"&-sm":{padding:0,borderRadius:D,[`input${r}-input`]:{height:_-2*d,padding:`0 ${y}px`}},"&:hover":{...s(n)},"&-focused":{...i(n)},"&-disabled":{...o(n),[`${r}-input`]:{cursor:`not-allowed`}},"&-out-of-range":{input:{color:v}},"&-group":{...e(n),...c(n),"&-wrapper":{display:`inline-block`,textAlign:`start`,verticalAlign:`top`,[`${r}-affix-wrapper`]:{width:`100%`},"&-lg":{[`${r}-group-addon`]:{borderRadius:O}},"&-sm":{[`${r}-group-addon`]:{borderRadius:D}}}},[r]:{"&-input":{width:`100%`,height:C-2*d,padding:`0 ${w}px`,textAlign:`start`,backgroundColor:`transparent`,border:0,borderRadius:m,outline:0,transition:`all ${x} linear`,appearance:`textfield`,color:n.colorText,fontSize:`inherit`,verticalAlign:`top`,...l(n.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:`none`,appearance:`none`}}}}},{[r]:{[`&:hover ${r}-handler-wrap, &-focused ${r}-handler-wrap`]:{opacity:1},[`${r}-handler-wrap`]:{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,width:n.handleWidth,height:`100%`,background:T,borderStartStartRadius:0,borderStartEndRadius:m,borderEndEndRadius:m,borderEndStartRadius:0,opacity:+(A===!0),display:`flex`,flexDirection:`column`,alignItems:`stretch`,transition:`opacity ${x} linear ${x}`,[`${r}-handler`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`auto`,height:`40%`,[`
              ${r}-handler-up-inner,
              ${r}-handler-down-inner
            `]:{marginInlineEnd:0,fontSize:n.handleFontSize}}},[`${r}-handler`]:{height:`50%`,overflow:`hidden`,color:b,fontWeight:`bold`,lineHeight:0,textAlign:`center`,cursor:`pointer`,borderInlineStart:`${d}px ${f} ${p}`,transition:`all ${x} linear`,"&:active":{background:n.colorFillAlter},"&:hover":{height:`60%`,[`
              ${r}-handler-up-inner,
              ${r}-handler-down-inner
            `]:{color:S}},"&-up-inner, &-down-inner":{...t(),color:b,transition:`all ${x} linear`,userSelect:`none`}},[`${r}-handler-up`]:{borderStartEndRadius:m},[`${r}-handler-down`]:{borderBlockStart:`${d}px ${f} ${p}`,borderEndEndRadius:m},"&-disabled, &-readonly":{[`${r}-handler-wrap`]:{display:`none`},[`${r}-input`]:{color:`inherit`}},[`
          ${r}-handler-up-disabled,
          ${r}-handler-down-disabled
        `]:{cursor:`not-allowed`},[`
          ${r}-handler-up-disabled:hover &-handler-up-inner,
          ${r}-handler-down-disabled:hover &-handler-down-inner
        `]:{color:E}}},{[`${r}-borderless`]:{borderColor:`transparent`,boxShadow:`none`,[`${r}-handler-down`]:{borderBlockStartWidth:0}}}]},p=e=>{let{componentCls:t,inputPaddingHorizontal:n,inputAffixPadding:r,controlWidth:i,borderRadiusLG:o,borderRadiusSM:c}=e;return{[`${t}-affix-wrapper`]:{...a(e),...u(e,`${t}-affix-wrapper`),position:`relative`,display:`inline-flex`,width:i,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:o},"&-sm":{borderRadius:c},[`&:not(${t}-affix-wrapper-disabled):hover`]:{...s(e),zIndex:1},"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:`transparent`}},[`> div${t}`]:{width:`100%`,border:`none`,outline:`none`,[`&${t}-focused`]:{boxShadow:`none !important`}},[`input${t}-input`]:{padding:0},"&::before":{width:0,visibility:`hidden`,content:`"\\a0"`},[`${t}-handler-wrap`]:{zIndex:2},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,pointerEvents:`none`},"&-prefix":{marginInlineEnd:r},"&-suffix":{position:`absolute`,insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:`100%`,marginInlineEnd:n,marginInlineStart:r}}}}},m=n(`InputNumber`,e=>{let t=d(e);return[f(t),p(t),r(t)]},e=>({controlWidth:90,handleWidth:e.controlHeightSM-e.lineWidth*2,handleFontSize:e.fontSize/2,handleVisible:`auto`}));export{m as default};