import{isTruthy as n}from"../../../utils/guards/is-truthy.js";import{normalizeRouteSlug as g}from"../../../utils/path/normalize-route-slug.js";import{telemetryTraceStep as u}from"../../../cli/telemetry/helpers/trace-step.js";async function d(){return{id:"CatalogClassic",requiredEntitlements:["catalogClassic"],async processContent(a,{getConfig:l}){await u("build.plugin.catalog_classic",async o=>{const c=a.createTemplate("catalogClassic","@redocly/theme/components/CatalogClassic/CatalogClassic"),e=await l(),i=e.catalogClassic??{};o?.setAttribute("config",JSON.stringify(e.catalogClassic));for(const[r,t]of Object.entries(i)){const s=g(t.slug);a.addRoute({duplicateInAllLocales:!0,slug:s,fsPath:s,templateId:c,excludeFromSidebar:!0,serverPropsGetterIds:[],getNavText:()=>Promise.resolve(t.title||"API Catalog"),getStaticData:async()=>({props:{catalogId:r,catalogConfig:{...t,filters:t.filters?.filter(n),items:void 0},seo:{title:t.title||"API Catalog"}}})})}})}}}export{d as catalogClassicPlugin};
