import{initInputToken as m,genPlaceholderStyle as f,genActiveStyle as x,genDisabledStyle as w,genStatusStyle as y,genBasicInputStyle as I}from"../../input/style/index.mjs";import{textEllipsis as v,resetComponent as l}from"../../style/index.mjs";import"../../theme/internal.mjs";import z from"../../theme/util/genComponentStyleHook.mjs";const H=o=>{const{componentCls:t,colorTextDisabled:r,controlItemBgHover:i,controlPaddingHorizontal:s,colorText:n,motionDurationSlow:p,lineHeight:a,controlHeight:c,inputPaddingHorizontal:d,inputPaddingVertical:h,fontSize:g,colorBgElevated:u,borderRadiusLG:e,boxShadowSecondary:b}=o,S=Math.round((o.controlHeight-o.fontSize*o.lineHeight)/2);return{[t]:{...l(o),...I(o),position:"relative",display:"inline-block",height:"auto",padding:0,overflow:"hidden",lineHeight:a,whiteSpace:"pre-wrap",verticalAlign:"bottom",...y(o,t),"&-disabled":{"> textarea":{...w(o)}},"&-focused":{...x(o)},[`&-affix-wrapper ${t}-suffix`]:{position:"absolute",top:0,insetInlineEnd:d,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},[`> textarea, ${t}-measure`]:{color:n,boxSizing:"border-box",minHeight:c-2,margin:0,padding:`${h}px ${d}px`,overflow:"inherit",overflowX:"hidden",overflowY:"auto",fontWeight:"inherit",fontSize:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontVariant:"inherit",fontSizeAdjust:"inherit",fontStretch:"inherit",lineHeight:"inherit",direction:"inherit",letterSpacing:"inherit",whiteSpace:"inherit",textAlign:"inherit",verticalAlign:"top",wordWrap:"break-word",wordBreak:"inherit",tabSize:"inherit"},"> textarea":{width:"100%",border:"none",outline:"none",resize:"none",backgroundColor:"inherit",...f(o.colorTextPlaceholder)},[`${t}-measure`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:-1,color:"transparent",pointerEvents:"none","> span":{display:"inline-block",minHeight:"1em"}},"&-dropdown":{...l(o),position:"absolute",top:-9999,insetInlineStart:-9999,zIndex:o.zIndexPopup,boxSizing:"border-box",fontSize:g,fontVariant:"initial",backgroundColor:u,borderRadius:e,outline:"none",boxShadow:b,"&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:o.dropdownHeight,marginBottom:0,paddingInlineStart:0,overflow:"auto",listStyle:"none",outline:"none","&-item":{...v,position:"relative",display:"block",minWidth:o.controlItemWidth,padding:`${S}px ${s}px`,color:n,fontWeight:"normal",lineHeight:a,cursor:"pointer",transition:`background ${p} ease`,"&:hover":{backgroundColor:i},"&:first-child":{borderStartStartRadius:e,borderStartEndRadius:e,borderEndStartRadius:0,borderEndEndRadius:0},"&:last-child":{borderStartStartRadius:0,borderStartEndRadius:0,borderEndStartRadius:e,borderEndEndRadius:e},"&-disabled":{color:r,cursor:"not-allowed","&:hover":{color:r,backgroundColor:i,cursor:"not-allowed"}},"&-selected":{color:n,fontWeight:o.fontWeightStrong,backgroundColor:i},"&-active":{backgroundColor:i}}}}}}},$=z("Mentions",o=>{const t=m(o);return[H(t)]},o=>({dropdownHeight:250,controlItemWidth:100,zIndexPopup:o.zIndexPopupBase+50}));export{$ as default};
