{
  "version": 3,
  "sources": ["../../../src/config/url-base.ts"],
  "sourcesContent": ["import type { ApiRoutingContext } from '../types/ApiRoutingContext.mjs';\nimport { makeApiRoutingContext } from '../types/ApiRoutingContext.mjs';\n\nconst globalDefaultApiRoutingContext = makeApiRoutingContext();\n\n/** Gets the default API routing context */\nexport const getDefaultApiRoutingContext = () => globalDefaultApiRoutingContext;\n\n/** Removes the URL base configuration for the specified route type, which will cause the default URL base to be used unless a subsequent\n * reconfiguration is made for the specified route type */\nexport const clearUrlBaseForRouteType = (\n  routeType: string,\n  { context = globalDefaultApiRoutingContext }: { context?: ApiRoutingContext } = {}\n) => {\n  delete context.urlBasesByRouteType[routeType];\n};\n\n/** Gets the default URL base that will be used in cases where no URL base has been specifically configured for a given route type */\nexport const getDefaultUrlBase = ({ context = globalDefaultApiRoutingContext }: { context?: ApiRoutingContext } = {}) =>\n  context.defaultUrlBase;\n\n/**\n * Gets the URL base for the specified route type.\n *\n * If a URL base wasn't configured for the specified route type, the default URL base will be returned.\n */\nexport const getUrlBaseForRouteType = (\n  routeType: string,\n  { context = globalDefaultApiRoutingContext }: { context?: ApiRoutingContext } = {}\n) => context.urlBasesByRouteType[routeType] ?? context.defaultUrlBase;\n\n/** Sets the default URL base that will be used in cases where no URL base has been specifically configured for a given route type */\nexport const setDefaultUrlBase = (urlBase: string, { context = globalDefaultApiRoutingContext }: { context?: ApiRoutingContext } = {}) => {\n  context.defaultUrlBase = urlBase;\n};\n\n/** Configures the URL base for the specified route type. */\nexport const setUrlBaseForRouteType = (\n  routeType: string,\n  urlBase: string,\n  { context = globalDefaultApiRoutingContext }: { context?: ApiRoutingContext } = {}\n) => {\n  context.urlBasesByRouteType[routeType] = urlBase;\n};\n"],
  "mappings": "AACA,SAAS,6BAA6B;AAEtC,MAAM,iCAAiC,sBAAsB;AAGtD,MAAM,8BAA8B,MAAM;AAI1C,MAAM,2BAA2B,CACtC,WACA,EAAE,UAAU,+BAA+B,IAAqC,CAAC,MAC9E;AACH,SAAO,QAAQ,oBAAoB,SAAS;AAC9C;AAGO,MAAM,oBAAoB,CAAC,EAAE,UAAU,+BAA+B,IAAqC,CAAC,MACjH,QAAQ;AAOH,MAAM,yBAAyB,CACpC,WACA,EAAE,UAAU,+BAA+B,IAAqC,CAAC,MAC9E,QAAQ,oBAAoB,SAAS,KAAK,QAAQ;AAGhD,MAAM,oBAAoB,CAAC,SAAiB,EAAE,UAAU,+BAA+B,IAAqC,CAAC,MAAM;AACxI,UAAQ,iBAAiB;AAC3B;AAGO,MAAM,yBAAyB,CACpC,WACA,SACA,EAAE,UAAU,+BAA+B,IAAqC,CAAC,MAC9E;AACH,UAAQ,oBAAoB,SAAS,IAAI;AAC3C;",
  "names": []
}
