import{resetComponent as d}from"../../style/index.mjs";import"../../theme/internal.mjs";import{merge as s}from"../../theme/util/statistic.mjs";function l(i,t){const{componentCls:e,inputPaddingHorizontalBase:n,borderRadius:r}=i,o=i.controlHeight-i.lineWidth*2,a=Math.ceil(i.fontSize*1.25),c=t?`${e}-${t}`:"";return{[`${e}-single${c}`]:{fontSize:i.fontSize,[`${e}-selector`]:{...d(i),display:"flex",borderRadius:r,[`${e}-selection-search`]:{position:"absolute",top:0,insetInlineStart:n,insetInlineEnd:n,bottom:0,"&-input":{width:"100%"}},[`
          ${e}-selection-item,
          ${e}-selection-placeholder
        `]:{padding:0,lineHeight:`${o}px`,transition:`all ${i.motionDurationSlow}`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${o}px`}},[`${e}-selection-item`]:{position:"relative",userSelect:"none"},[`${e}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${e}-selection-item:after`,`${e}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}},[`
        &${e}-show-arrow ${e}-selection-item,
        &${e}-show-arrow ${e}-selection-placeholder
      `]:{paddingInlineEnd:a},[`&${e}-open ${e}-selection-item`]:{color:i.colorTextPlaceholder},[`&:not(${e}-customize-input)`]:{[`${e}-selector`]:{width:"100%",height:i.controlHeight,padding:`0 ${n}px`,[`${e}-selection-search-input`]:{height:o},"&:after":{lineHeight:`${o}px`}}},[`&${e}-customize-input`]:{[`${e}-selector`]:{"&:after":{display:"none"},[`${e}-selection-search`]:{position:"static",width:"100%"},[`${e}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${n}px`,"&:after":{display:"none"}}}}}}}function g(i){const{componentCls:t}=i,e=i.controlPaddingHorizontalSM-i.lineWidth;return[l(i),l(s(i,{controlHeight:i.controlHeightSM,borderRadius:i.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selection-search`]:{insetInlineStart:e,insetInlineEnd:e},[`${t}-selector`]:{padding:`0 ${e}px`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e+i.fontSize*1.5},[`
            &${t}-show-arrow ${t}-selection-item,
            &${t}-show-arrow ${t}-selection-placeholder
          `]:{paddingInlineEnd:i.fontSize*1.5}}}},l(s(i,{controlHeight:i.controlHeightLG,fontSize:i.fontSizeLG,borderRadius:i.borderRadiusLG}),"lg")]}export{g as default};
