import{resetComponent as e}from"../../style/index.mjs";import t from"../../theme/util/genComponentStyleHook.mjs";import{merge as n}from"../../theme/util/statistic.mjs";var r=t=>{let{antCls:n,componentCls:r,iconCls:i,avatarBg:a,avatarColor:o,containerSize:s,containerSizeLG:c,containerSizeSM:l,textFontSize:u,textFontSizeLG:d,textFontSizeSM:f,borderRadius:p,borderRadiusLG:m,borderRadiusSM:h,lineWidth:g,lineType:_}=t,v=(e,t,n)=>({width:e,height:e,lineHeight:`${e-g*2}px`,borderRadius:`50%`,[`&${r}-square`]:{borderRadius:n},[`${r}-string`]:{position:`absolute`,left:{_skip_check_:!0,value:`50%`},transformOrigin:`0 center`},[`&${r}-icon`]:{fontSize:t,[`> ${i}`]:{margin:0}}});return{[r]:{...e(t),position:`relative`,display:`inline-block`,overflow:`hidden`,color:o,whiteSpace:`nowrap`,textAlign:`center`,verticalAlign:`middle`,background:a,border:`${g}px ${_} transparent`,"&-image":{background:`transparent`},[`${n}-image-img`]:{display:`block`},...v(s,u,p),"&-lg":{...v(c,d,m)},"&-sm":{...v(l,f,h)},"> img":{display:`block`,width:`100%`,height:`100%`,objectFit:`cover`}}}},i=e=>{let{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=e;return{[`${t}-group`]:{display:`inline-flex`,[`${t}`]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:i}}}},a=t(`Avatar`,e=>{let{colorTextLightSolid:t,colorTextPlaceholder:a}=e,o=n(e,{avatarBg:a,avatarColor:t});return[r(o),i(o)]},e=>{let{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:a,fontSizeXL:o,fontSizeHeading3:s,marginXS:c,marginXXS:l,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:Math.round((a+o)/2),textFontSizeLG:s,textFontSizeSM:i,groupSpace:l,groupOverlapping:-c,groupBorderColor:u}});export{a as default};