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