import{a as ee}from"./chunk-HB7CXGHA.js";import{a as te}from"./chunk-UDVOUXE3.js";import{t as X}from"./chunk-RFBAGCTV.js";import{c as Y,i as Z}from"./chunk-7GWZLTP7.js";import{z as W}from"./chunk-RUXJW6JR.js";import{Ja as K,Ka as H,Ra as $,Sa as z,Ta as G,cb as q,db as J,eb as Q,i as U,l as V,ma as E,na as A,u as j}from"./chunk-SU3V5RM4.js";import{Aa as P,Ab as S,Cd as M,Ec as w,Fd as u,Gc as D,Hb as h,Jc as O,Jd as N,Rb as c,Rc as R,Uc as I,Wc as b,Xc as y,bc as l,cc as p,gc as x,hc as k,ia as d,lb as a,mb as r,nd as B,qc as F,rb as _,rc as m,sa as g,ta as C,wd as L}from"./chunk-SZVMDCYU.js";import{i as f}from"./chunk-OPK6FLFO.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(Y),r(V),r(te),r(Z))}}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:[E,A,H,K,W,X,U,J,Q,q,G,z,$,N,L,M,ee],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};
/**i18n:557364621938d8343d66734722390263df08d9a6046a2573ce83f95c485272f3*/
