import*as t from"react";import{useParams as p}from"react-router-dom";import{useMemo as u}from"react";import{ApiPage as s}from"./views";import{useData as c}from"./useData";function I(r){const{apiSlug:e}=p(),{apis:o,scorecardInfo:n,teamLabel:i,catalogConfig:l}=c(r),a=u(()=>e?o.find(m=>m.api.link===`/${decodeURIComponent(e)}`):void 0,[o,e]);return a?t.createElement(s,{catalogSlug:l.slug,slug:`/${decodeURIComponent(e||"")}`,api:a,teamLabel:i,rulesPerLevel:n.rulesPerLevel}):t.createElement("div",null,"API not found")}export{I as ApiDetailPage};
