text: const isProduction = window.location.href.includes("www.intern.nav.no") || window.location.href.includes("www.nav.no");
  const isDevelopment = window.location.href.includes("www.dev.nav.no");
  
  export const getEnvironment = () => {
    if (isProduction) {
      return "production";
    }
  
    if (isDevelopment) {
      return "development";
    }
  
    return "local";
  };
  
  const NAV_URL = {
    local: "http://localhost:3000",
    development: "https://www.dev.nav.no",
    production: "https://www.nav.no",
  };
  
  const API_URL = {
    local: "http://localhost:3000/api/endpoint",
    development: "https://person.dev.nav.no/api/endpoint",
    production: "https://person.nav.no/api/endpoint",
  };
  
  const DITTNAV_API_URL = {
    local: "http://localhost:3000/dittnav-api",
    development: "https://person.dev.nav.no/dittnav-api",
    production: "https://person.nav.no/dittnav-api",
  };
  
  const LOGINSERVICE_URL = {
    local: "http://localhost:3000",
    development: "https://loginservice.dev.nav.no",
    production: "https://loginservice.nav.no",
  };
  
  const TJENESTER_URL = {
    local: "http://localhost:3000/tjenester",
    development: "https://tjenester.dev.nav.no",
    production: "https://tjenester.nav.no",
  };
  
  const PERSON_NAV_URL = {
    local: "http://localhost:3000",
    development: "https://person.dev.nav.no",
    production: "https://person.nav.no",
  };
  
  export const apiUrl = API_URL[getEnvironment()];
  export const dittNavApiUrl = DITTNAV_API_URL[getEnvironment()];
  export const navUrl = NAV_URL[getEnvironment()];
  export const loginserviceUrl = LOGINSERVICE_URL[getEnvironment()];
  export const tjenesterUrl = TJENESTER_URL[getEnvironment()];
  export const personNavUrl = PERSON_NAV_URL[getEnvironment()];
  
  export const meldekortinfoApiUrl = `${dittNavApiUrl}/meldekortinfo`;
  export const meldekortUrl = `${navUrl}/meldekort`;
  export const oppgaverApiUrl = `${dittNavApiUrl}/oppgave`;
  export const beskjederApiUrl = `${dittNavApiUrl}/beskjed`;
  export const innboksApiUrl = `${dittNavApiUrl}/innboks`;
  export const inaktiveOppgaverApiUrl = `${dittNavApiUrl}/oppgave/inaktiv`;
  export const inaktiveBeskjederApiUrl = `${dittNavApiUrl}/beskjed/inaktiv`;
  export const inaktiveInnboksApiUrl = `${dittNavApiUrl}/innboks/inaktiv`;
  export const brukernavnApiUrl = `${dittNavApiUrl}/navn`;
  export const identApiUrl = `${dittNavApiUrl}/ident`;
  export const paabegynteSoknaderApiUrl = `${dittNavApiUrl}/saker/paabegynte`;
  export const ubehandledeMeldingerApiUrl = `${dittNavApiUrl}/meldinger/ubehandlede`;
  export const sakerApiUrl = `${dittNavApiUrl}/saker`;
  export const innloggingsstatusUrl = `${navUrl}/person/innloggingsstatus`;
  export const loginserviceStepUpUrl = `${loginserviceUrl}/login?level=Level4&redirect=https://www.nav.no/person/dittnav`;
  export const tilbakebetalingsUrl = `${navUrl}/dagpenger/forskudd/oversikt`;
  export const koronaVeiviserUrl = `${navUrl}/person/koronaveiviser`;
  export const utbetalingsoversiktUrl = `${navUrl}/utbetalingsoversikt`;
  export const mineSakerUrl = `${personNavUrl}/mine-saker`;
  export const oppfolgingUrl = `${dittNavApiUrl}/oppfolging`;
  export const postDigiSosDoneUrl = `${dittNavApiUrl}/digisos/paabegynte/done`;
  export const postDoneUrl = `${dittNavApiUrl}/produce/done`;
  export const sykefravaerUrl = `${navUrl}/syk/sykefravaer`;
  export const arbeidUrl = `${navUrl}/arbeid`;
  export const soknadUrl = `${navUrl}/soknader`;
  export const dinPensjonUrl = `${tjenesterUrl}/pselv/publisering/dinpensjon.jsf`;
  export const innboksUrl = "https://uat-navdialog.cs108.force.com/Innboks/s/";
  export const minInnboksUrl = "https://www.nav.no/no/ditt-nav/meldingene-dine-er-flyttet";
  export const dialogMedVeilederUrl = `${navUrl}/person/dittnav/veientilarbeid/dialog`;
  