import {n,l}from'./chunk-BOGzIQz2.js';import {J as J$1,c as tS,i as S,ib as f,U as RN,H as ul,L as w,ab as LN,N as Sr,f as QT,ic as _ne,ie as Gz,id as Uz,u as R,ii as F,cE as py,d8 as CM,bv as Vy,bw as y_,bx as v_,a0 as ks,a1 as Ny,v as W_,z as vM,a2 as Uu,bz as f_,A as Iw,c2 as iv,F as EM,a4 as Sy,C as Qu,di as DM}from'./main-WUGO6e7n.js';function U(e,i){if(e&1&&(W_(0),vM(1,"translate")),e&2){let t=i.$implicit;Qu(" ",EM(1,1,t.header)," ");}}function V(e,i){if(e&1&&(W_(0),vM(1,"translate")),e&2){let t=i.$implicit;Qu(" ",EM(1,1,t.label)," ");}}function A(e,i){if(e&1&&(W_(0),vM(1,"translate")),e&2){let t=i.$implicit;Qu(" ",EM(1,1,t.header)," ");}}function H(e,i){if(e&1&&(W_(0),vM(1,"translate")),e&2){let t=i.$implicit;Qu(" ",EM(1,1,t.label)," ");}}function q(e,i){if(e&1&&(W_(0),vM(1,"dateFormat")),e&2){let t=i.$implicit;Qu(" ",DM(1,1,t.expiresOn,"datetime")," ");}}function L(e,i){if(e&1&&(W_(0),vM(1,"dateFormat")),e&2){let t=i.$implicit;Qu(" ",DM(1,1,t.issuedOn,"datetime")," ");}}function G(e,i){if(e&1&&(W_(0),vM(1,"translate")),e&2){let t=i.$implicit;Qu(" ",EM(1,1,t.header)," ");}}function J(e,i){if(e&1&&(W_(0),vM(1,"translate")),e&2){let t=i.$implicit;Qu(" ",EM(1,1,t.label)," ");}}function K(e,i){if(e&1&&(ks(0,"div",1),Ny(1,"i",2),ks(2,"h2",3),W_(3),vM(4,"translate"),Uu()(),ks(5,"dvl-table",4),py(6,U,2,3,"ng-template",5)(7,V,2,3,"ng-template",6),Uu(),ks(8,"div",7)(9,"dvl-table",4),py(10,A,2,3,"ng-template",5)(11,H,2,3,"ng-template",6)(12,q,2,4,"ng-template",8)(13,L,2,4,"ng-template",9),Uu()(),ks(14,"div",7)(15,"dvl-table",4),py(16,G,2,3,"ng-template",5)(17,J,2,3,"ng-template",6),Uu()()),e&2){let t=f_();Iw(3),iv(EM(4,7,"lblCertificateCouldNotBeVerified")),Iw(2),Sy("value",t.subjectRows)("columns",t.subjectColumns),Iw(4),Sy("value",t.validityRows)("columns",t.validityColumns),Iw(6),Sy("value",t.thumbprintRows)("columns",t.thumbprintColumns);}}var M,re,W=J$1(()=>{tS();n();S();f();RN();ul();tS();M=["certificateContent"];re=(()=>{class e{constructor(){this.certificateConfirmationService=w(l),this.dvlConfirmationService=w(LN),this.translatorService=w(Sr),this.subjectColumns=[{field:"label",header:""},{field:"issuedTo",header:"lblIssuedTo"},{field:"issuedBy",header:"lblIssuedBy"}],this.validityColumns=[{field:"label",header:""},{field:"expiresOn",header:"lblExpiresOn"},{field:"issuedOn",header:"lblIssuedOn"}],this.thumbprintColumns=[{field:"label",header:""},{field:"thumbprint",header:"lblThumbprint"}],this.subjectRows=[],this.validityRows=[],this.thumbprintRows=[];}ngOnInit(){this.certificateConfirmationService.showCertificateDialogObservable.subscribe(t=>{this.certificate=t.certificate,this.buildRows(),this.dvlConfirmationService.confirm({intent:"warning",title:this.translatorService.translate("lblCertificate"),message:"",width:"580px",contentTemplate:this.certificateContent,acceptLabel:this.translatorService.translate("lblContinueAndSave"),accept:()=>t.acceptFunction(this.certificate)});});}buildRows(){this.subjectRows=[{label:"lblCommonName",issuedTo:this.certificate?.issuedToCN,issuedBy:this.certificate?.issuedByCN},{label:"lblOrganization",issuedTo:this.certificate?.issuedToO,issuedBy:this.certificate?.issuedByO},{label:"lblOrganizationalUnit",issuedTo:this.certificate?.issuedToOU,issuedBy:this.certificate?.issuedByOU}],this.validityRows=[{label:"lblValidityPeriod",expiresOn:this.certificate?.expiresOn,issuedOn:this.certificate?.issuedOn}],this.thumbprintRows=[{label:"lblThumbprint",thumbprint:this.certificate?.thumbprint}];}static{this.\u0275fac=function(r){return new(r||e)};}static{this.\u0275cmp=QT({type:e,selectors:[["dvls-certificate-confirmation-dialog"]],viewQuery:function(r,_){if(r&1&&Vy(M,7),r&2){let C;y_(C=v_())&&(_.certificateContent=C.first);}},decls:2,vars:0,consts:[["certificateContent",""],[1,"text-center","pb-5"],[1,"di","dvl-icon-warning","alert"],[1,"text-lg"],["layout","content",3,"value","columns"],["dvlTableHeader",""],["dvlTableCell","label"],[1,"mt-3"],["dvlTableCell","expiresOn"],["dvlTableCell","issuedOn"]],template:function(r,_){r&1&&py(0,K,18,9,"ng-template",null,0,CM);},dependencies:[_ne,Gz,Uz,R,F],styles:[".alert[_ngcontent-%COMP%]{color:gold;font-size:50px;display:block;margin-bottom:10px}  .certificat-dialog .header>th{background:var(--dialog-header-confirmation-background-color)}"],changeDetection:1});}}return e})();});export{W,re as r};