
const Variables = {
    // #region servers
    lhost: window.location.href.indexOf("localhost/") > -1,
    prod: window.location.href.indexOf("https://documentation") !== -1,
    tst: window.location.href.indexOf("https://tst-documentation") !== -1,
    exp: window.location.href.indexOf("https://tst-expere-documentation") !== -1,
    stg: window.location.href.indexOf("https://stg-documentation") !== -1,
    dev: window.location.href.indexOf("https://dev-documentation") !== -1,
    // #endregion

    // #region General variables
    DefaultText: "Enter text to start filtering",
    IsChangelog: window.location.href.indexOf("changelog.html") !== -1,
    IsChangelogPage: window.location.href.indexOf("changelog.html") !== -1,
    IsHosted: window.location.href.indexOf("audience=hosted") !== -1,
    IsIndex: window.location.href.indexOf("index.html") !== -1,
    IsInstalled: window.location.href.indexOf("audience=installed") !== -1,
    IsSearchPage: window.location.href.indexOf("/search.html?searchQuery") !== -1,
    revLevel: sessionStorage.getItem('revision'),
    // #endregion

    // #region Generic variables
    ProductLandingPage: "",
    ProductName: "",
    IsRN: "",
    IncRNLink: '',
    ChangelogLink: "",
    RemoveSearch: "",
    // #endregion

    // #region DGS
    IsADA: window.location.href.toLowerCase().indexOf("/ADA/") > -1,
    IsDataConversionGuide: window.location.href.toLowerCase().indexOf("/DefaultData/OPPSAConversion/") !== -1,
    IsDefaultData: window.location.href.toLowerCase().indexOf("/DefaultData/") !== -1,
    IsDefaultDataInstallGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/DefaultData/InstallationGuide/") !== -1,
    IsDefaultDataODInstGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/DefaultData/OD-InstallGuide/") !== -1,
    IsDefaultDataUpgradeGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/DefaultData/UpgradeGuide/") !== -1,
    IsDefaultDataUserGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/DefaultData/UserGuide/") !== -1,
    IsDefaultDataWebServGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/DefaultData/WebServicesGuide/") !== -1,
    IsDGS: window.location.href.toLowerCase().indexOf("/DGS/") !== -1,
    IsDGSChangelog: window.location.href.toLowerCase().indexOf("DGS/Change-Log") !== -1,
    IsDGSImpStrat: window.location.href.toLowerCase().indexOf("DGS/Implementation-Strategies") !== -1,
    IsDGSMgmtServGuide: window.location.href.toLowerCase().indexOf("/DGS/Management-Services/") !== -1,
    IsDGSMgmtToolGuide: window.location.href.toLowerCase().indexOf("/DGS/Management-Tool/") !== -1,
    IsDGSODInstallGuide: window.location.href.toLowerCase().indexOf("/DGS/OD-Installation-Guide/") !== -1,
    IsDGSServInstallGuide: window.location.href.toLowerCase().indexOf("/DGS/Installation-Guide/") !== -1,
    IsDGSServUpgradeGuide: window.location.href.toLowerCase().indexOf("/DGS/Upgrade-Process/") !== -1,
    IsDGSToolSuite: window.location.href.toLowerCase().indexOf("DGS/Tool-Suite") !== -1,
    IsDGSWebServices: window.location.href.toLowerCase().indexOf("DGS/Web-Services") !== -1,
    IsEOriginalQuickGuide: window.location.href.toLowerCase().indexOf("/Expere/eOriginal/QuickGuide/") !== -1,
    IsEZConfig: window.location.href.toLowerCase().indexOf("ExpereEZConfig") !== -1,
    IsEZConfConsChangelog: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/ChangeLog/") !== -1,
    IsEZGateway: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/EZGateway/") !== -1,
    IsEZGatewayInstallGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/EZGateway/InstallGuide/") !== -1,
    IsEZGatewayODInstGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/EZGateway/OD-Installation-Guide/") !== -1,
    IsEZGatewayWebServGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/EZGateway/WebServices/") !== -1,
    IsOAuth: window.location.href.toLowerCase().indexOf("OAuth") !== -1,
    IsOAuthSetupGuide: window.location.href.toLowerCase().indexOf("/OAuth/Setup/") !== -1,
    IsOPPSA: window.location.href.toLowerCase().indexOf("OPPSA") !== -1,
    IsPnP: window.location.href.toLowerCase().indexOf("/PackagesAndPackets/") !== -1,
    IsPnPChangelog: window.location.href.toLowerCase().indexOf("/PackagesAndPackets/ChangeLog/") !== -1,
    IsPnPInstallGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/InstallGuide/") !== -1,
    IsPNPUpgradeGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/PackagesAndPackets/UpgradeGuide/") !== -1,
    IsPNPUserGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/PackagesAndPackets/UserGuide/") !== -1,
    IsPNPWebServGuide: window.location.href.toLowerCase().indexOf("/ExpereEZConfig/WebservicesGuide/") !== -1,
    // #endregion

    // #region Expere Authoring
    AdminToolUG: "/Expere/Authoring/AdministrationTool/",
    AuthoringRN: "/Expere/Authoring/ReleaseNotes/",
    AuthoringRNArchives: "/Expere/Authoring/ReleaseNotesArchive/",
    AuthoringEnvInstUg: "/Expere/Authoring/AuthoringEnvironmentInstallation/",
    DictionaryViewerUG: "/Expere/Authoring/DV/",
    DocViewer: "/DocViewer/",
    EForms: "/EForms/",
    EngineInstallationUG: "/Expere/Authoring/EngineInstallation/",
    ReqEd3UG: "/Expere/Authoring/RequirementsEditor/",
    ReqEd4UG: "/Expere/Authoring/RequirementsEditor4/",
    // IsAdminToolUG: window.location.href.indexOf("/Expere/Authoring/AdministrationTool/") !== -1,
    IsAuthoring: window.location.href.toLowerCase().indexOf("/expere/authoring/") !== -1,
    IsAuthoringChangelog: window.location.href.toLowerCase().indexOf("/expere/authoring/releaseNotes/") !== -1,
    IsAuthoringChangelogHome: window.location.href.toLowerCase().indexOf("/expere/authoring/releaseNotes/index.html") !== -1,
    IsAuthoringEnvInstUg: window.location.href.toLowerCase().indexOf("/expere/authoring/authoringenvironmentinstallation/") !== -1,
    IsAuthRN: window.location.href.toLowerCase().indexOf("/Expere/Authoring/ReleaseNotes/") !== -1,
    IsAuthRNArchives: window.location.href.toLowerCase().indexOf("/Expere/Authoring/ReleaseNotesArchive/") !== -1,
    IsDictionaryViewerUG: window.location.href.toLowerCase().indexOf("/Expere/Authoring/DV/") !== -1,
    IsDocViewer: window.location.href.toLowerCase().indexOf("/DocViewer/") !== -1,
    IsEForms: window.location.href.toLowerCase().indexOf("/EForms/") !== -1,
    IsEngineInstallationUG: window.location.href.toLowerCase().indexOf("/Expere/Authoring/EngineInstallation/") !== -1,
    IsReqEd3UG: window.location.href.toLowerCase().indexOf("/Expere/Authoring/RequirementsEditor/") !== -1,
    IsReqEd4UG: window.location.href.toLowerCase().indexOf("/Expere/Authoring/RequirementsEditor4/") !== -1,
    // #endregion

    // #region Expere Engine
    EngineChangelog: "/Expere/Engine/Change-Log/",
    ExpereDeveloperGuide: "/Expere/Engine/Developer/",
    ExpereImpGuide: "/Expere/Engine/Implementation-Guide/",
    ExpereSystemReq: "/Expere/Engine/Sys-Req/",
    ExpereTestingSystem: "/Expere/Engine/Testing-System/",
    IsDocViewerChangelog: window.location.href.toLowerCase().indexOf("/DocViewer/ReleaseNotes/") !== -1,
    IsDocViewerIntGuide: window.location.href.toLowerCase().indexOf("/DocViewer/IntegrationGuide/") !== -1,
    IsDocViewerUserGuide: window.location.href.toLowerCase().indexOf("/DocViewer/UserGuide/") !== -1,
    IsEngine: window.location.href.toLowerCase().indexOf("/Expere/Engine/") !== -1,
    IsEngineChangelog: window.location.href.toLowerCase().indexOf("/Expere/Engine/Change-Log/") !== -1,
    IsExpereDeveloperGuide: window.location.href.toLowerCase().indexOf("/Expere/Engine/Developer/") !== -1,
    IsExpereImpGuide: window.location.href.toLowerCase().indexOf("/Expere/Engine/Implementation-Guide/") !== -1,
    IsExpereSystemReq: window.location.href.toLowerCase().indexOf("/Expere/Engine/Sys-Req/") !== -1,
    IsExpereTestingSystem: window.location.href.toLowerCase().indexOf("/Expere/Engine/Testing-System/") !== -1,
    // #endregion

    // #region Expere EZ Config
    // Add any EZ Config variables here
    // #endregion

    // #region I-32
    I32Changelog: "/I-32/Changelog/",
    I32FormsDesignUG: "/I-32/FormsDesignUserGuide/",
    I32ImageUpdateUG: "/I-32/ImageUpdate/",
    IsI32: window.location.href.toLowerCase().indexOf("/I-32/") !== -1,
    IsI32Changelog: window.location.href.toLowerCase().indexOf("/I-32/Changelog/") !== -1,
    IsI32FormsDesignUG: window.location.href.toLowerCase().indexOf("/I-32/FormsDesignUserGuide/") !== -1,
    IsI32ImageUpdateUG: window.location.href.toLowerCase().indexOf("/I-32/ImageUpdate/") !== -1,
    // #endregion

    // #region WK-ESign
    WKESignCaptureGuide: "/WoltersKluwer_E-Sign/Capture/",
    WKESignFAQ: "/WoltersKluwer_E-Sign/FAQ/",
    WKESignLegacyUserguide: "/WoltersKluwer_E-Sign/LegacyUserGuide/",
    WKESignOnsiteUG: "/WoltersKluwer_E-Sign/Onsite/",
    WKESignPushStatusUG: "/WoltersKluwer_E-Sign/PushStatus/",
    WKESignReleaseNotes: "/WoltersKluwer_E-Sign/ReleaseNotes/",
    WKESignUserGuide: "/WoltersKluwer_E-Sign/UserGuide/",
    WKESignSysReq: "/WoltersKluwer_E-Sign/SystemRequirements/",
    WKESignWebServices: "/WoltersKluwer_E-Sign/Webservices/",
    IsWKES: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/") !== -1,
    IsWKESignCaptureGuide: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/Capture/") !== -1,
    IsWKESignFAQ: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/FAQ/") !== -1,
    IsWKESignLegacyUserGuide: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/LegacyUserGuide/") !== -1,
    IsWKESignOnsiteUG: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/Onsite/") !== -1,
    IsWKESignPushStatusUG: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/PushStatus/") !== -1,
    IsWKESignReleaseNotes: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/ReleaseNotes/") !== -1,
    IsWKESignSysReq: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/SystemRequirements/") !== -1,
    IsWKESignUserGuide: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/UserGuide/") !== -1,
    IsWKESignWebServices: window.location.href.toLowerCase().indexOf("/WoltersKluwer_E-Sign/Webservices/") !== -1,
    // #endregion

    // #region WK-Hosted-Expere
    WKHostedToolSuite: "/WK-Hosted-Expere/Tool-Suite/",
    IsDocMgmt: window.location.href.toLowerCase().indexOf("eOriginal/DocumentMgmt-IntGuide") !== -1,
    IsEDS: window.location.href.toLowerCase().indexOf("/WK-Hosted-Expere/") !== -1,
    IseOriginal: window.location.href.toLowerCase().indexOf("/eOriginal/") !== -1,
    IsWKHosted: window.location.href.toLowerCase().indexOf("WK-Hosted-Expere") !== -1,
    IsWKHostedChangelog: window.location.href.toLowerCase().indexOf("WK-Hosted-Expere/Change-Log") !== -1,
    IsWKHostedImpStrat: window.location.href.toLowerCase().indexOf("WK-Hosted-Expere/Implementation-Strategies") !== -1,
    IsWKHostedOverview: window.location.href.toLowerCase().indexOf("WK-Hosted-Expere/Change-Log/topics/eds_change-log-overview.html") !== -1,
    IsWKHostedToolSuite: window.location.href.toLowerCase().indexOf("/WK-Hosted-Expere/Tool-Suite/") !== -1,
    IsWKHostedWebServices: window.location.href.toLowerCase().indexOf("WK-Hosted-Expere/Web-Services") !== -1,
    // #endregion

    // #region Lending Systems
    Assumptions: "/Assumptions/",
    InterfaceManager: "/InterfaceManager/",
    Mortgage: "/Mortgage/",
    ProductDownloadSite: "/ProductDownloadSite/",
    SecAdmin: "/SecurityAdministration/",
    SecAdminSelfHosted: "/SecurityAdministrationself-hosted/",
    TSoftPlus: "/TSoftPlus/",
    Vanceo: "/Vanceo/",
    Workflow: "/Workflow/",
    IsAssumptions: window.location.href.indexOf("/Assumptions/") !== -1 || window.location.href.indexOf("/assumptions/") !== -1,
    IsInterfaceManager: window.location.href.toLowerCase().indexOf("/InterfaceManager/") !== -1 || window.location.href.indexOf("/interfacemanager/") !== -1,
    IsMortgage: window.location.href.indexOf("/Mortgage/") !== -1 || window.location.href.indexOf("/mortgage/") !== -1,
    IsProductDownloadSite: window.location.href.indexOf("/ProductDownloadSite/") !== -1 || window.location.href.indexOf("/productdownloadsite/") !== -1,
    IsSecAdmin: window.location.href.toLowerCase().indexOf("/SecurityAdministration/") !== -1,
    IsSecAdminSelfHosted: window.location.href.toLowerCase().indexOf("/SecurityAdministrationself-hosted/") !== -1,
    IsTSoftPlus: window.location.href.toLowerCase().indexOf("/TSoftPlus/") !== -1 || window.location.href.indexOf("/tsoftplus/") !== -1,
    IsVanceo: window.location.href.toLowerCase().indexOf("/Vanceo/") !== -1 || window.location.href.indexOf("/vanceo/") !== -1,
    IsWorkflow: window.location.href.toLowerCase().indexOf("/Workflow/") !== -1 || window.location.href.indexOf("/workflow/") !== -1,
    // #endregion

    // #region Landing pages
    IsAuthoringLP: window.location.href.indexOf("Authoring/index.html") !== -1,
    DGSChangelogPath: "/DGS/index.html",
    WKHostedChangelogPath: "/WK-Hosted-Expere/index.html",
    // #endregion

    // Uncomment if needed
    // currentPageName: getBaseName(window.location.href) + ".html",
    // var_searchquery: getURLParameter('searchQuery'),

    // #region For STS
    RemoveTocSA:  window.location.href.indexOf("SecurityAdministration") != -1,
    RemoveTocMort: window.location.href.indexOf("Mortgage") != -1,
    RemoveTocC1: window.location.href.indexOf("C1Administration") != -1,
    RemoveTocAss: window.location.href.indexOf("Assumptions") != -1,
    // #endregion
};

console.log("Variables loaded successfully.");
console.log("window.location.href:", window.location.href);
console.log("IsAuthoring:", Variables.IsAuthoring);
window.Variables = Variables;

