import{a as B}from"./chunk-FNDXPXHD.js";import{a as R}from"./chunk-4EEGS4SZ.js";import{a as O}from"./chunk-3PEMIHKH.js";import{c as x,d as $,e as b,f as q,h as P,i as z,j as F,k as G}from"./chunk-DQXXLIFV.js";import{$b as o,Ab as E,Ac as I,Gb as v,Jc as C,Ld as V,Pc as c,Qc as g,Rb as m,Tc as S,Wb as h,Yb as A,Zb as T,_ as N,_b as y,ac as r,da as w,fd as M,ia as U,kc as l,m as p,nb as n,s as u,sd as L,yc as d,zc as _}from"./chunk-LU6Q5ONP.js";M();V();var j=e=>({"paw-padding-bottom-m":e});function J(e,s){if(e&1&&(o(0,"div",2)(1,"span"),d(2),c(3,"pawTranslate"),r()()),e&2){let t=l();m("ngClass",C(4,j,t.details)),n(2),_(g(3,2,t.message))}}function K(e,s){if(e&1&&(o(0,"div")(1,"span"),d(2),c(3,"pawTranslate"),r()()),e&2){let t=s.$implicit;n(2),_(g(3,1,t))}}function Q(e,s){if(e&1&&(o(0,"div",2),T(1,K,4,3,"div",null,A),r()),e&2){let t=l();m("ngClass",C(1,j,t.details)),n(),y(t.messages)}}function W(e,s){if(e&1&&(o(0,"div",4),d(1),c(2,"pawTranslate"),r()),e&2){let t=l(2);n(),I(" ",g(2,1,t.details)," ")}}function X(e,s){if(e&1&&(o(0,"paw-panel",3),v(1,W,3,3,"ng-template",null,0,S),r()),e&2){let t=l();m("settings",t.detailsPanel)}}var ae=(()=>{class e{constructor(){this.actions=[{id:"login-error-close-action",label:"Close",type:"mat-flat-button",onSelected:()=>{this.dialogRef.close()}}],this.detailsPanel={id:R.PanelAppLoginErrorMsgDetails,expanded:!1,title:"ErrorDetails"}}ngOnInit(){this.dialogRef.dialog.dialogActions=this.actions}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=E({type:e,selectors:[["paw-app-login-error-msg"]],inputs:{dialogRef:"dialogRef",message:"message",messages:"messages",details:"details"},standalone:!1,decls:4,vars:2,consts:[["contentTpl",""],[1,"paw-padding-m","paw-border-bottom"],[3,"ngClass"],[3,"settings"],[1,"paw-padding-left-m","paw-padding-right-m","paw-padding-bottom-m","paw-padding-top-s"]],template:function(i,a){i&1&&(o(0,"div",1),v(1,J,4,6,"div",2)(2,Q,3,3,"div",2)(3,X,3,1,"paw-panel",3),r()),i&2&&(n(),h(a.message?1:a.messages?2:-1),n(2),h(a.details?3:-1))},dependencies:[L,B,O],encapsulation:2})}}return e})();z();N();$();q();M();G();var me=(()=>{class e{get availableUserDomains(){return this._availableUserDomains}constructor(t){this.api=t,this._availableUserDomains=[]}clearAvailableUserDomains(){this._availableUserDomains=[]}getAvailableUserDomains(t,i,a=null){return t.username.length===0?p([]):this.loadOrCache(t,!b.isSet(a)).pipe(u(D=>(b.isSet(a)?x.filter(D,f=>f.toUpperCase().indexOf(a.toUpperCase())===0):D).sort((f,k)=>x.alphaNumericSort(f,k))))}loadOrCache(t,i=!1){return!i&&this._availableUserDomains.length>0?p(this._availableUserDomains):this.fetchAvailableUserDomains(t)}fetchAvailableUserDomains(t){return t.username.length===0||t.password.length===0?(this._availableUserDomains=[],p([])):this.api.post(P.auth.availableUserDomains,t).pipe(u(i=>(this._availableUserDomains=i,this._availableUserDomains)))}static{this.\u0275fac=function(i){return new(i||e)(U(F))}}static{this.\u0275prov=w({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{ae as a,me as b};
