const e=require("../_util/props-util/index.js"),t=require("../config-provider/hooks/useConfigInject.js"),n=require("../_util/vnode.js"),r=require("./AvatarContext.js"),i=require("./style/index.js"),a=require("./Avatar.js"),o=require("../popover/index.js");let s=require("vue");var c=()=>({prefixCls:String,maxCount:Number,maxStyle:{type:Object,default:void 0},maxPopoverPlacement:{type:String,default:`top`},maxPopoverTrigger:String,size:{type:[Number,String,Object],default:`default`},shape:{type:String,default:`circle`}}),l=(0,s.defineComponent)({compatConfig:{MODE:3},name:`AAvatarGroup`,inheritAttrs:!1,props:c(),setup(c,{slots:l,attrs:u}){let{prefixCls:d,direction:f}=t.default(`avatar`,c),p=(0,s.computed)(()=>`${d.value}-group`),[m,h]=i.default(d);return(0,s.watchEffect)(()=>{r.useAvatarProviderContext({size:c.size,shape:c.shape})}),()=>{let{maxPopoverPlacement:t=`top`,maxCount:r,maxStyle:i,maxPopoverTrigger:d=`hover`,shape:g}=c,_={[p.value]:!0,[`${p.value}-rtl`]:f.value===`rtl`,[`${u.class}`]:!!u.class,[h.value]:!0},v=e.flattenChildren(e.getPropsSlot(l,c)).map((e,t)=>n.cloneElement(e,{key:`avatar-key-${t}`})),y=v.length;if(r&&r<y){let e=v.slice(0,r),n=v.slice(r,y);return e.push((0,s.createVNode)(o.default,{key:`avatar-popover-key`,content:n,trigger:d,placement:t,overlayClassName:`${p.value}-popover`},{default:()=>[(0,s.createVNode)(a.default,{style:i,shape:g},{default:()=>[`+${y-r}`]})]})),m((0,s.createVNode)(`div`,{...u,class:_,style:u.style},[e]))}return m((0,s.createVNode)(`div`,{...u,class:_,style:u.style},[v]))}}});exports.default=l,exports.groupProps=c;