import{a as te}from"./chunk-5WEX4WXF.js";import{s as Y}from"./chunk-A5BGCB72.js";import{d as Z,g as ee}from"./chunk-7UEYEAFD.js";import{z as X}from"./chunk-F7N4QFP2.js";import{A as u,Cb as J,Db as Q,E as U,Eb as W,H as V,Ma as A,Na as K,Q as j,aa as E,b as B,hb as H,ib as $,l as L,pb as z,q as M,qb as G,rb as q,w as N}from"./chunk-LN23P53Z.js";import{Aa as P,Bb as S,Cc as w,Dc as D,Gc as O,Hb as h,Oc as R,Rc as I,Tb as c,Uc as b,Vc as y,dc as l,ec as p,ia as d,ic as x,jc as k,lb as a,oc as F,pc as m,qb as _,rb as r,sa as g,ta as C}from"./chunk-2BMUMDG3.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))}console.log("Licensed Products: ",this.PRODUCTS),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){console.log("path : "+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,L,Q,W,J,q,G,z,U,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};
