import{e as F}from"./chunk-YVBHSTH4.js";import{na as T,oa as k}from"./chunk-TLX24J4H.js";import{a as E,e as S}from"./chunk-35QF24UV.js";import{Y as z,aa as D,ia as A,ya as m}from"./chunk-KOULBGOK.js";import{$c as P,Ab as l,Ac as b,Bc as w,Ea as g,Fb as a,Mc as d,Oc as M,Tb as i,cc as s,dc as p,ec as f,gd as I,hc as x,mb as r,oc as C,pc as v,qc as _,rb as h,rc as y,zc as O}from"./chunk-ZGECHOBP.js";function N(t,c){if(t&1&&(s(0,"div"),b(1),p()),t&2){let e=v();r(),w(e.initials)}}function R(t,c){if(t&1&&f(0,"tis-svg",3),t&2){let e=v();i("icon",e.avatarIcon)("size",e.svgSize)}}var L=(()=>{class t{constructor(){this.name="",this.size="medium",this.variant="default",this.avatarIcon=E.Avatar,this.initials=""}get svgSize(){return this.size==="medium"?"default":"large"}get avatarClasses(){return{avatar:!0,[this.size]:!0,[this.variant]:!0}}ngOnInit(){this.initials=this._getInitials()}_getInitials(){let e=this.name.split(" ");return e.length===0?"":e.length===1?e[0].charAt(0):e[0].charAt(0)+e[1].charAt(0)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=l({type:t,selectors:[["tis-avatar"]],inputs:{name:"name",size:"size",variant:"variant"},decls:4,vars:3,consts:[["avatar",""],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"icon",3,"icon","size"]],template:function(n,o){if(n&1&&(s(0,"div",1),a(1,N,2,1,"div",2),p(),a(2,R,1,2,"ng-template",null,0,P)),n&2){let u=O(3);i("ngClass",o.avatarClasses),r(),i("ngIf",o.initials)("ngIfElse",u)}},dependencies:[m,z,D,S],styles:["[_nghost-%COMP%]{display:block;width:fit-content}.avatar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;overflow:hidden;text-transform:uppercase;-webkit-user-select:none;user-select:none;border-radius:var(--radius-circular)}.avatar.medium[_ngcontent-%COMP%]{width:36px;height:36px;font:var(--font-body-1-strong)}.avatar.large[_ngcontent-%COMP%]{width:64px;height:64px;font:var(--font-subtitle-1)}.avatar.default[_ngcontent-%COMP%]{color:var(--avatar-color-primary);background:var(--avatar-bg-primary)}.avatar.default[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{fill:var(--avatar-color-primary)}.avatar.secondary[_ngcontent-%COMP%]{color:var(--avatar-color-secondary);background:var(--avatar-bg-secondary)}.avatar.secondary[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{fill:var(--avatar-color-secondary)}.avatar.alternative[_ngcontent-%COMP%]{color:var(--avatar-color-alternative);background:var(--avatar-bg-alternative)}.avatar.alternative[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{fill:var(--avatar-color-alternative)}"],changeDetection:0})}}return t})();var V=["*"],W=()=>({duration:0}),$=(t,c)=>({show:t,hide:c}),q=()=>({class:"dx-custom-popover"});function B(t,c){t&1&&x(0)}var at=(()=>{class t{get target(){return typeof this.for=="string"||typeof this.for=="number"?`#${this.for}`:this.for}get position(){return F(this.alignment)}constructor(e){this._cdr=e,this.alignment="left bottom",this.isOpen=!1,this.closed=new g}toggle(){this.isOpen=!this.isOpen,this._cdr.detectChanges()}close(){this.isOpen=!1,this._cdr.detectChanges(),this.closed.emit()}static{this.\u0275fac=function(n){return new(n||t)(h(I))}}static{this.\u0275cmp=l({type:t,selectors:[["tis-popover"]],inputs:{for:"for",template:"template",alignment:"alignment",minWidth:"minWidth",isOpen:"isOpen"},outputs:{closed:"closed"},ngContentSelectors:V,decls:3,vars:14,consts:[[3,"onHiding","target","visible","position","minWidth","hideOnOutsideClick","animation","wrapperAttr"],[4,"ngTemplateOutlet"]],template:function(n,o){n&1&&(_(),s(0,"dx-popover",0),C("onHiding",function(){return o.close()}),a(1,B,1,0,"ng-container",1),y(2),p()),n&2&&(i("target",o.target)("visible",o.isOpen)("position",o.position)("minWidth",o.minWidth)("hideOnOutsideClick",!0)("animation",M(10,$,d(8,W),d(9,W)))("wrapperAttr",d(13,q)),r(),i("ngTemplateOutlet",o.template))},dependencies:[m,A,k,T],styles:[`.dx-custom-popover{color:inherit}.dx-custom-popover .dx-popup-content{padding:var(--space-vertical-snudge) var(--space-horizontal-snudge)}.dx-custom-popover .dx-popover-arrow{display:none}.dx-custom-popover .dx-overlay-content.dx-popup-normal.dx-resizable.dx-popup-fullscreen-width.dx-popup-inherit-height,.dx-custom-popover .dx-overlay-content.dx-popup-normal.dx-resizable.dx-popup-inherit-height{width:fit-content;max-width:400px;color:inherit;background:var(--popover-bg);border:none;border-radius:var(--radius-medium);box-shadow:var(--shadow-16)}.dx-custom-popover .dx-popup-content.dx-popup-content-scrollable[role=tooltip]{padding:var(--space-vertical-snudge) var(--space-horizontal-snudge)}.dx-custom-popover .dx-overlay-wrapper.dx-popup-wrapper.dx-popover-wrapper.dx-popover-without-title{font:inherit;color:inherit}
`],encapsulation:2,changeDetection:0})}}return t})();export{L as a,at as b};
