import{a as te}from"./chunk-2TZTT6OS.js";import{t as Y}from"./chunk-YAWZK65A.js";import{z as X}from"./chunk-NBWAUNUZ.js";import{c as Z,i as ee}from"./chunk-V2DPLVZ2.js";import{Db as J,Eb as Q,Fb as W,H as U,I as V,Oa as A,Pa as K,R as j,a as B,ba as E,f as M,jb as H,kb as $,l as N,p as u,rb as z,s as L,sb as G,tb as q}from"./chunk-OGMMZFJL.js";import{Da as P,Eb as S,Fc as w,Gc as D,Jc as O,Kb as h,Sc as R,Vc as I,Wb as c,Yc as b,Zc as y,gc as l,hc as p,la as d,lc as x,mc as k,ob as a,rc as F,sc as m,tb as _,ub as r,va as g,wa as C}from"./chunk-QVZULMP5.js";import{i as f}from"./chunk-2AVGQ2MQ.js";var ie=(n,o)=>({product:n,activeTab:o});function ne(n,o){if(n&1){let e=k();l(0,"c-nav-item")(1,"button",7),F("click",function(){let i=g(e),s=i.$implicit,v=i.index,T=m();return C(T.setActiveTab(s.key,v))}),D(2),b(3,"translate"),b(4,"translate"),p()()}if(n&2){let e=o.$implicit,t=o.index,i=m(),s=w(7);a(),c("cTabContent",s)("tabPaneIdx",t),a(),O(" ",y(3,4,e.title)," ",y(4,6,i.pageLabelPostFix)," ")}}function oe(n,o){n&1&&x(0)}function se(n,o){if(n&1&&(l(0,"c-tab-pane",8),h(1,oe,1,0,"ng-container",9),p()),n&2){let e=o.$implicit,t=m();a(),c("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",I(2,ie,e,t.activeTab))}}var Se=(()=>{class n{constructor(e,t,i,s,v,T){this.datePipe=e,this.router=t,this.sharedService=i,this.titleService=s,this.licenseCheckService=v,this.userRoleService=T,this.pageLabelPostFix="",this.noneNullValueForShowing="",this.showNavigation=!1,this.PRODUCTS=[],this.parent="Policy Management",this.child="",this.subchild="",this.userType="",this.statistics={},this.usersPortal=[],this.itemVisible=[!1,!1],this.productsLicensed=[],this.activeTab="home",this.showBluVaultTab="true",this.showBluSyncTab="true",this.showOnedrivetTab="true",this.showExchangeTab="true",this.showSharepointTab="true",this.showGmailTab="true",this.activeTabIndex=0,this.isMspEnabled=!1,this.inclusionLicenses=[],this.exclusionLicenses=[],this.#e=d(P),this.#t=d(B),this.#i=d(_),this.displayStyle="none",this.visible=!1,this.items=[1,2]}#e;#t;#i;openPopup(){this.displayStyle="block"}closePopup(){this.displayStyle="none"}openBackupPopup(){this.displayStyle="block",this.itemVisible=[!1,!1]}closeBackupPopup(){this.displayStyle="none"}trackByKey(e,t){return t.key}openRestorePopup(){this.displayStyle="block"}closeRestorePopup(){this.displayStyle="none"}toggleCollapse(){this.visible=!this.visible}getFormattedDate(e){return this.datePipe.transform(e,"dd-MMM-yyyy HH:mm:ss")||""}toggleLiveDemo(){this.visible=!this.visible}handleLiveDemoChange(e){this.visible=e}ngOnInit(){return f(this,null,function*(){if(this.PRODUCTS=yield this.licenseCheckService.getLicensedProductsDetails(),this.noneNullValueForShowing){let e=this.noneNullValueForShowing.split(".");this.PRODUCTS=this.PRODUCTS.filter(t=>e.reduce((i,s)=>i[s],t))}this.setInitialActiveTab(),this.userType=yield this.userRoleService.getUserRole(),this.inclusionLicenses.includes("msp_environment_enabled")&&(this.userType==="admin"||this.userType==="user")&&this.router.navigate(["/404"])})}setActiveTab(e,t){this.activeTab=e,this.activeTabIndex=t,this.sharedService.setData("selectedProductType",e)}setInitialActiveTab(){let e=-1,t=this.sharedService.getDataByKey("selectedProductType");t&&(e=this.PRODUCTS.findIndex(i=>i.key===t)),e===-1&&(e=0),this.setActiveTab(this.PRODUCTS[e].key,e)}sendMeTo(e,t){this.router.navigate([e])}static{this.\u0275fac=function(t){return new(t||n)(r(u),r(j),r(Z),r(V),r(te),r(ee))}}static{this.\u0275cmp=S({type:n,selectors:[["product-tabs"]],inputs:{contentTemplate:"contentTemplate",pageLabelPostFix:"pageLabelPostFix",noneNullValueForShowing:"noneNullValueForShowing",showNavigation:"showNavigation"},features:[R([u])],decls:9,vars:5,consts:[["tabContent1","cTabContent"],["xs","12"],[1,"mb-3"],["variant","tabs","role","tablist"],[4,"ngFor","ngForOf","ngForTrackBy"],["cRounded","bottom",3,"activeTabPaneIdx"],["class","p-3 preview",4,"ngFor","ngForOf","ngForTrackBy"],["cNavLink","",3,"click","cTabContent","tabPaneIdx"],[1,"p-3","preview"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,i){t&1&&(l(0,"c-row")(1,"c-col",1)(2,"c-card",2)(3,"c-card-body")(4,"c-nav",3),h(5,ne,5,8,"c-nav-item",4),p(),l(6,"c-tab-content",5,0),h(8,se,2,5,"c-tab-pane",6),p()()()()()),t&2&&(a(5),c("ngForOf",i.PRODUCTS)("ngForTrackBy",i.trackByKey),a(),c("activeTabPaneIdx",i.activeTabIndex),a(2),c("ngForOf",i.PRODUCTS)("ngForTrackBy",i.trackByKey))},dependencies:[A,K,$,H,X,Y,U,Q,W,J,q,G,z,L,M,N,E],styles:[".background[_ngcontent-%COMP%]{position:absolute;top:60%;left:60%;transform:translate(-50%,-50%);color:#0000001a;z-index:0}"]})}}return n})();export{Se as a};
