import{a as c}from"./chunk-3DEA4WWC.js";import{a as t}from"./chunk-CAGDTHS6.js";import{na as i}from"./chunk-GJDGQISV.js";import{a}from"./chunk-SNAKHGZS.js";var n=class o{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:t.intercom.appId,name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){localStorage.setItem("Intercom",JSON.stringify(e))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!0,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(e.hide_default_launcher=!1,window.Intercom("update",a({app_id:t.intercom.appId},e)),this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return c.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static \u0275fac=function(r){return new(r||o)};static \u0275prov=i({token:o,factory:o.\u0275fac,providedIn:"root"})};export{n as a};
