import{A as n}from"./index.0972fd96.js";import{a as k,C as G,M as v,c1 as T,K as O,cg as $,j as s,be as z,N as i}from"./index.0d073eaa.js";import{a as I}from"./useSize.bb4e5ce5.js";var E=function(){return{prefixCls:String,maxCount:Number,maxStyle:{type:Object,default:void 0},maxPopoverPlacement:{type:String,default:"top"},maxPopoverTrigger:String,size:{type:[Number,String,Object],default:"default"}}},K=k({name:"AAvatarGroup",inheritAttrs:!1,props:E(),setup:function(e,p){var S=p.slots,t=p.attrs,f=G("avatar-group",e),u=f.prefixCls,h=f.direction;return I(e),function(){var a,d=e.maxPopoverPlacement,_=d===void 0?"top":d,o=e.maxCount,b=e.maxStyle,g=e.maxPopoverTrigger,j=g===void 0?"hover":g,P=(a={},v(a,u.value,!0),v(a,"".concat(u.value,"-rtl"),h.value==="rtl"),v(a,"".concat(t.class),!!t.class),a),A=T(S,e),l=O(A).map(function(y,C){return $(y,{key:"avatar-key-".concat(C)})}),c=l.length;if(o&&o<c){var x=l.slice(0,o),N=l.slice(o,c);return x.push(s(z,{key:"avatar-popover-key",content:N,trigger:j,placement:_,overlayClassName:"".concat(u.value,"-popover")},{default:function(){return[s(n,{style:b},{default:function(){return["+".concat(c-o)]}})]}})),s("div",i(i({},t),{},{class:P,style:t.style}),[x])}return s("div",i(i({},t),{},{class:P,style:t.style}),[l])}}}),m=K;n.Group=m;n.install=function(r){return r.component(n.name,n),r.component(m.name,m),r};
