System.register(["./index-83dd9303.system.js"],(function(a){"use strict";var t,i,r,e;return{setters:[function(a){t=a.r;i=a.a;r=a.h;e=a.e}],execute:function(){var s=".host{position:relative;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.avatar__group{display:-ms-flexbox;display:flex}.avatar__group>*:nth-child(1){z-index:1}.avatar__group>*:nth-child(2){z-index:2}.avatar__group>*:nth-child(3){z-index:3}.avatar__group>*:nth-child(4){z-index:4}.avatar__group>*:nth-child(5){z-index:5}.avatar__group>*:nth-child(6){z-index:6;width:auto}.avatar__group>*:nth-child(6) div{background-color:#1a2437;padding:0 16px;width:auto}.avatar__group__click--true{cursor:pointer}.avatar__group .avatar{position:relative}.avatar__group__size--extra-small{margin-left:8px}.avatar__group__size--extra-small>*{margin-left:-8px}.avatar__group__size--extra-small>*:nth-child(6) div{padding:0 8px}.avatar__group__size--extra-small .avatar{height:32px}.avatar__group__size--small{margin-left:8px}.avatar__group__size--small>*{margin-left:-8px}.avatar__group__size--small .avatar{height:40px}.avatar__group__size--standard{margin-left:16px}.avatar__group__size--standard>*{margin-left:-16px}.avatar__group__size--standard .avatar{height:56px}.avatar__group__size--large{margin-left:16px}.avatar__group__size--large>*{margin-left:-16px}.avatar__group__size--large .avatar{height:64px}.avatar__group__size--extra-large{margin-left:16px}.avatar__group__size--extra-large>*{margin-left:-16px}.avatar__group__size--extra-large .avatar{height:72px}.focus:focus-visible{display:-ms-flexbox;display:flex;position:absolute;border:2px solid var(--color-focus, #c226fb);border-radius:4px;width:100%;height:100%;top:-4px;left:-4px;padding-right:4px;padding-bottom:4px;outline:none}";var n=a("bds_avatar_group",function(){function a(a){t(this,a);this.bdsClickAvatarGroup=i(this,"bdsClickAvatarGroup",7);this.avatarBgColor=function(a){var t=["system","success","warning","error","info"];return t[a]};this.internalUsers=undefined;this.leftoversUsers=undefined;this.size="standard";this.users=undefined;this.canClick=undefined}a.prototype.handleClickGroup=function(a){a.preventDefault();this.bdsClickAvatarGroup.emit(a)};a.prototype.handleClickKey=function(a){if((a.key==="Enter"||a.key===" ")&&this.canClick){a.preventDefault();this.bdsClickAvatarGroup.emit()}};a.prototype.parseUsers=function(){if(this.users){try{this.internalUsers=typeof this.users==="string"?JSON.parse(this.users):this.users}catch(a){this.internalUsers=[]}}};a.prototype.componentWillLoad=function(){this.users&&this.parseUsers();this.leftoversUsers=this.internalUsers.length-5};a.prototype.render=function(){var a;var t=this;return r(e,{key:"be25d5e80705769f25c1fff5b82724f42e20a3c2",class:"host"},r("div",{key:"128216ce7924b434370b0787c0b1bbff057802cb",class:(a={avatar__group:true},a["avatar__group__size--".concat(this.size)]=true,a["avatar__group__click--".concat(this.canClick)]=true,a),onClick:function(){return t.handleClickGroup}},this.internalUsers?this.internalUsers.slice(0,6).map((function(a,i,e){return i+1===e.length&&t.internalUsers.length>5?r("bds-avatar",{key:i,name:a.name,color:"surface",size:t.size,ellipsis:t.leftoversUsers}):r("bds-avatar",{key:i,id:a.id,name:a.name,thumbnail:a.thumbnail,color:t.avatarBgColor(i),size:t.size})})):r("slot",null)),this.canClick?r("div",{class:"focus",tabindex:"0",onClick:function(){return t.handleClickKey}}):"")};return a}());n.style=s}}}));
//# sourceMappingURL=bds-avatar-group.system.entry.js.map