import{resetIcon as e}from"../../style/index.mjs";import{merge as t}from"../../theme/util/statistic.mjs";var n=2;function r({controlHeightSM:e,controlHeight:t,lineWidth:n}){let r=(t-e)/2-n;return[r,Math.ceil(r/2)]}function i(t,i){let{componentCls:a,iconCls:o}=t,s=`${a}-selection-overflow`,c=t.controlHeightSM,[l]=r(t);return{[`${a}-multiple${i?`${a}-${i}`:``}`]:{fontSize:t.fontSize,[s]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`100%`,display:`inline-flex`}},[`${a}-selector`]:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,padding:`${l-n}px ${n*2}px`,borderRadius:t.borderRadius,[`${a}-show-search&`]:{cursor:`text`},[`${a}-disabled&`]:{background:t.colorBgContainerDisabled,cursor:`not-allowed`},"&:after":{display:`inline-block`,width:0,margin:`${n}px 0`,lineHeight:`${c}px`,content:`"\\a0"`}},[`
        &${a}-show-arrow ${a}-selector,
        &${a}-allow-clear ${a}-selector
      `]:{paddingInlineEnd:t.fontSizeIcon+t.controlPaddingHorizontal},[`${a}-selection-item`]:{position:`relative`,display:`flex`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,height:c,marginTop:n,marginBottom:n,lineHeight:`${c-t.lineWidth*2}px`,background:t.colorFillSecondary,border:`${t.lineWidth}px solid ${t.colorSplit}`,borderRadius:t.borderRadiusSM,cursor:`default`,transition:`font-size ${t.motionDurationSlow}, line-height ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,userSelect:`none`,marginInlineEnd:n*2,paddingInlineStart:t.paddingXS,paddingInlineEnd:t.paddingXS/2,[`${a}-disabled&`]:{color:t.colorTextDisabled,borderColor:t.colorBorder,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:t.paddingXS/2,overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...e(),display:`inline-block`,color:t.colorIcon,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${o}`]:{verticalAlign:`-0.2em`},"&:hover":{color:t.colorIconHover}}},[`${s}-item + ${s}-item`]:{[`${a}-selection-search`]:{marginInlineStart:0}},[`${a}-selection-search`]:{display:`inline-flex`,position:`relative`,maxWidth:`100%`,marginInlineStart:t.inputPaddingHorizontalBase-l,"\n          &-input,\n          &-mirror\n        ":{height:c,fontFamily:t.fontFamily,lineHeight:`${c}px`,transition:`all ${t.motionDurationSlow}`},"&-input":{width:`100%`,minWidth:4.1},"&-mirror":{position:`absolute`,top:0,insetInlineStart:0,insetInlineEnd:`auto`,zIndex:999,whiteSpace:`pre`,visibility:`hidden`}},[`${a}-selection-placeholder `]:{position:`absolute`,top:`50%`,insetInlineStart:t.inputPaddingHorizontalBase,insetInlineEnd:t.inputPaddingHorizontalBase,transform:`translateY(-50%)`,transition:`all ${t.motionDurationSlow}`}}}}function a(e){let{componentCls:n}=e,a=t(e,{controlHeight:e.controlHeightSM,controlHeightSM:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),[,o]=r(e);return[i(e),i(a,`sm`),{[`${n}-multiple${n}-sm`]:{[`${n}-selection-placeholder`]:{insetInlineStart:e.controlPaddingHorizontalSM-e.lineWidth,insetInlineEnd:e.controlPaddingHorizontalSM-e.lineWidth},[`${n}-selection-search`]:{marginInlineStart:o}}},i(t(e,{fontSize:e.fontSizeLG,controlHeight:e.controlHeightLG,controlHeightSM:e.controlHeight,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius}),`lg`)]}export{a as default};