import{withPathPrefix as f}from"@redocly/theme/core/utils";import{ServerRoutes as n}from"../../../constants/api";import{OPENAPI_DOCS_TEMPLATE_ID as s}from"../../../constants/common";async function S(i,r){const e=await fetch(f(n.RESOLVE_ROUTE_BY_SLUG),{method:"POST",body:JSON.stringify(i)}),{route:o}=await e.json();let t=r;return(r==="markdown"||r===s)&&(t=o.fsPath),{file:t.replace(/^\//g,""),url:i,pointer:o.pointer,position:o.position}}export{S as resolveRouteBySlug};
