import{a as _,b as S,c as b}from"./chunk-J75YHVMQ.js";import{q as n,r as O,uf as c,vf as w}from"./chunk-EAIMSMGJ.js";import{b as x,c as D}from"./chunk-IOINCEV4.js";import{Ac as s,Eb as h,Gd as I,Ia as m,Ob as d,Rc as C,Sc as f,Tb as g,ec as a,ic as u,lc as o,qc as y,rc as T,sc as l,zb as r}from"./chunk-JSJB5BKT.js";import{e as A}from"./chunk-SZAW6ZBW.js";function $(e,p){if(e&1&&l(0,"img",0),e&2){let t=s();a("alt",t.serverTypeString)("pTooltip",t.tooltip)}}function E(e,p){if(e&1&&l(0,"img",1),e&2){let t=s();a("alt",t.serverTypeString)("pTooltip",t.tooltip)}}function M(e,p){if(e&1&&l(0,"img",2),e&2){let t=s();a("alt",t.serverTypeString)("pTooltip",t.tooltip)}}function P(e,p){if(e&1&&l(0,"img",3),e&2){let t=s();a("alt",t.serverTypeString)("pTooltip",t.tooltip)}}function U(e,p){if(e&1&&l(0,"i",4),e&2){let t=s();a("pTooltip",t.tooltip)}}function N(e,p){if(e&1&&l(0,"i",5),e&2){let t=s();a("pTooltip",t.tooltip)}}function j(e,p){if(e&1&&l(0,"i",6),e&2){let t=s();a("pTooltip",t.tooltip)}}function k(e,p){if(e&1&&(y(0,"span",7),C(1),T()),e&2){let t=s();r(),f(t.serverTypeString)}}var R,L=A(()=>{O();w();b();I();D();b();R=(()=>{class e{constructor(t){this.translatorService=t,this.showLabel=!1,this.showExternalId=!1,this.type="user",this.serverUserType=n}ngOnChanges(t){this.type==="role"?(this.serverType=this.toServerType(this.roleType),this.serverTypeString=this.toAuthenticationTypeString(this.serverType)):(this.serverType=this.userType,this.serverTypeString=this.toAuthenticationTypeString(this.serverType)),this.tooltip=this.showExternalId?this.toExternalIdDisplayValue():this.serverTypeString}toAuthenticationTypeString(t){return this.translatorService.translate(n.getEnumKey(t??0))}toServerType(t){switch(t){case c.ActiveDirectory:return n.Domain;case c.Custom:return n.Builtin;case c.Office365:return n.AzureAD;case c.Okta:return n.Okta;case c.PingOne:return n.PingOne}return n.None}toExternalIdDisplayValue(){switch(this.serverType){case n.Domain:return`${this.serverTypeString} (${this.translatorService.translate("lblID")}: ${this.externalId?.sid||this.translatorService.translate("lblNotAvailable")}, ${this.translatorService.translate("lblDomain")}: ${this.externalId?.domainName||this.translatorService.translate("lblNotAvailable")})`;case n.AzureAD:return`${this.serverTypeString} (${this.translatorService.translate("lblID")}: ${this.externalId?.objectId||this.translatorService.translate("lblNotAvailable")})`;case n.Okta:return`${this.serverTypeString} (${this.translatorService.translate("lblID")}: ${this.externalId?.subjectId||this.translatorService.translate("lblNotAvailable")})`;case n.PingOne:return`${this.serverTypeString} (${this.translatorService.translate("lblID")}: ${this.externalId?.subjectId||this.translatorService.translate("lblNotAvailable")})`;default:return this.serverTypeString}}static{this.\u0275fac=function(v){return new(v||e)(h(x))}}static{this.\u0275cmp=d({type:e,selectors:[["dvls-col-authentication-type"]],inputs:{userType:"userType",roleType:"roleType",showLabel:"showLabel",externalId:"externalId",showExternalId:"showExternalId",type:"type"},features:[m],decls:10,vars:11,consts:[["src","./assets/images/login/microsoft-logo.svg",1,"server-type-image",3,"alt","pTooltip"],["src","./assets/images/login/active-directory-logo.svg",1,"server-type-image",3,"alt","pTooltip"],["src","./assets/images/login/okta-logo.svg",1,"server-type-image",3,"alt","pTooltip"],["src","./assets/images/login/ping-identity.svg",1,"server-type-image",3,"alt","pTooltip"],[1,"dvl-icon","dvl-icon-logo-microsoft-sql","server-type-icon",3,"pTooltip"],[1,"dvl-icon","dvl-icon-logo-dvls","server-type-icon",3,"pTooltip"],[1,"dvl-icon","dvl-icon-entry-session-command-line","server-type-icon",3,"pTooltip"],[1,"user-type-label"]],template:function(v,i){v&1&&(y(0,"div")(1,"div"),g(2,$,1,2,"img",0)(3,E,1,2,"img",1)(4,M,1,2,"img",2)(5,P,1,2,"img",3)(6,U,1,1,"i",4)(7,N,1,1,"i",5)(8,j,1,1,"i",6)(9,k,2,1,"span",7),T()()),v&2&&(r(),u(i.showLabel?"server-type-container server-type-with-label":"server-type-container"),r(),o(i.serverType===i.serverUserType.AzureAD?2:-1),r(),o(i.serverType===i.serverUserType.Domain?3:-1),r(),o(i.serverType===i.serverUserType.Okta?4:-1),r(),o(i.serverType===i.serverUserType.PingOne?5:-1),r(),o(i.serverType===i.serverUserType.SqlServer?6:-1),r(),o(i.serverType===i.serverUserType.Builtin?7:-1),r(),o(i.serverType===i.serverUserType.Application?8:-1),r(),o(i.showLabel?9:-1))},dependencies:[S,_],styles:[".server-type-image[_ngcontent-%COMP%]{height:24px}.server-type-icon[_ngcontent-%COMP%]{font-size:24px;color:#0068c3}.server-type-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.server-type-with-label[_ngcontent-%COMP%]{justify-content:left}.user-type-label[_ngcontent-%COMP%]{padding-left:5px}"]})}}return e})()});export{R as a,L as b};
