import{d as f}from"./chunk-7EAWKBIV.js";import{$b as l,I as p}from"./chunk-ATD4AEXQ.js";import{Qc as m,ca as n,fa as a}from"./chunk-BXH3QC5E.js";var u=(()=>{class t{restService;constructor(e){this.restService=e}getScreenTemplateForDialog(e){let r=new m;return r=r.append("dialogCode",e),this.restService.get(`${p.SCREEN_TEMPLATES}`,r)}static \u0275fac=function(r){return new(r||t)(a(f))};static \u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var S=(()=>{class t{screenTemplatesService;constructor(e){this.screenTemplatesService=e}getScreenTemplateForDialog(e){return this.screenTemplatesService.getScreenTemplateForDialog(e)}static \u0275fac=function(r){return new(r||t)(a(u))};static \u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var s=(()=>{class t{screenTemplateFacade;screenTemplates=[];constructor(e){this.screenTemplateFacade=e}loadScreenTemplate(e){return l.isNullOrUndefined(this.getScreenTemplate(e))?new Promise((r,i)=>{this.screenTemplateFacade.getScreenTemplateForDialog(e).subscribe({next:o=>{o&&(o.dialogCode=e,this.screenTemplates.push(o)),r(o)},error:o=>{i(o)}})}):this.getScreenTemplate(e)}getScreenTemplate(e){return this.screenTemplates.find(r=>r.dialogCode===e)}getScreenComponentByType(e,r){let i=this.getScreenTemplate(e);return i?i.screenTemplateLines.filter(o=>o.screenComponentType===r).sort((o,T)=>o.sequenceNumber-T.sequenceNumber):[]}static \u0275fac=function(r){return new(r||t)(a(S))};static \u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var h=(()=>{class t{screenTemplatesManager;constructor(e){this.screenTemplatesManager=e}resolve(e){return this.screenTemplatesManager.loadScreenTemplate(e)}static \u0275fac=function(r){return new(r||t)(a(s))};static \u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{s as a,h as b};
