"use strict";(self.webpackChunkwebadmin=self.webpackChunkwebadmin||[]).push([["libs_dialogs_tos-update_tos-update_component_ts"],{73938:(U,_,n)=>{n.r(_),n.d(_,{TosUpdateModalContent:()=>P});var r=n(82529),i=n(60177),p=n(60802),E=n(36121),f=n(19128),t=n(4020),u=n(64147),g=n(60272),m=n(77894);const M=e=>({date:e});function T(e,d){1&e&&(t.j41(0,"span",13),t.EFF(1,"Decline"),t.k0s())}function h(e,d){1&e&&(t.j41(0,"span",4),t.EFF(1,"Skip for now"),t.k0s())}function C(e,d){1&e&&(t.j41(0,"span",14),t.EFF(1,"Your grace period has ended. Please read and accept the terms and conditions to continue using cloud services"),t.k0s())}function D(e,d){if(1&e&&(t.qex(0),t.j41(1,"span"),t.EFF(2),t.nI1(3,"date"),t.nI1(4,"translate"),t.k0s(),t.bVm()),2&e){const o=t.XpG();t.R7$(2),t.JRh(t.i5U(4,4,"You have until {date} to accept the updated terms and conditions",t.eq3(7,M,t.i5U(3,1,o.gracePeriodDeadline,"longDate"))))}}let P=(()=>{class e{constructor(o,{grace_period:s,body:a}){this.dialogRef=o,this.inGracePeriod=!1,this.gracePeriodDeadline=(0,f.S1)(new Date,{day:s}),this.body=a,this.inGracePeriod=s>0}close(o){this.dialogRef.close(o)}static{this.\u0275fac=function(s){return new(s||e)(t.rXU(r.ce),t.rXU(r.Qs))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["nx-tos-update-content"]],decls:19,vars:10,consts:[["noGraceCancel",""],["noGrace",""],[1,"modal-header"],[1,"modal-title"],["translate","",1,"ellipsis"],[1,"modal-body"],[1,"paragraph",3,"innerHTML"],[1,"modal-footer",2,"flex-wrap","unset"],["type","button","translate","",1,"nx-button--primary",3,"click"],["type","button",1,"btn","btn-default",3,"click"],["class","ellipsis","translate","",4,"ngIf","ngIfElse"],["id","grace-text"],[4,"ngIf","ngIfElse"],["translate",""],["translate","",1,"error-label"]],template:function(s,a){if(1&s){const l=t.RV6();t.j41(0,"div",2)(1,"h1",3)(2,"span",4),t.EFF(3,"Update on Terms and Conditions"),t.k0s()()(),t.j41(4,"div",5),t.nrm(5,"p",6),t.nI1(6,"translate"),t.nI1(7,"safe"),t.k0s(),t.j41(8,"div",7)(9,"button",8),t.bIt("click",function(){return t.eBV(l),t.Njj(a.close("accepted"))}),t.EFF(10," Accept "),t.k0s(),t.j41(11,"button",9),t.bIt("click",function(){return t.eBV(l),t.Njj(a.close(a.inGracePeriod?"deferred":"rejected"))}),t.DNE(12,T,2,0,"ng-template",null,0,t.C5r)(14,h,2,0,"span",10),t.k0s(),t.j41(15,"div",11),t.DNE(16,C,2,0,"ng-template",null,1,t.C5r)(18,D,5,9,"ng-container",12),t.k0s()()}if(2&s){const l=t.sdS(13),c=t.sdS(17);t.R7$(5),t.Y8G("innerHTML",t.i5U(7,7,t.bMT(6,5,a.body),"html"),t.npT),t.R7$(9),t.Y8G("ngIf",a.inGracePeriod)("ngIfElse",l),t.R7$(4),t.Y8G("ngIf",a.inGracePeriod)("ngIfElse",c)}},dependencies:[i.MD,i.bT,i.vh,p.h,u.M,g.D,E.Y,m.i],styles:["[_nghost-%COMP%]{max-height:90vh;display:flex;flex-direction:column}.modal-body[_ngcontent-%COMP%]{flex:1;overflow-y:scroll}"]})}}return e})()}}]);