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