import{useParams as n}from"react-router-dom";import{useMemo as f}from"react";import*as l from"react";import{useData as d}from"./useData";import{RuleView as c}from"./views";function R(o){const{problemsByRule:a,hasTeam:r,hasPublishedAt:u,teamLabel:m,catalogConfig:s}=d(o),{ruleId:e}=n(),t=f(()=>e?a.find(i=>i.ruleId===e):void 0,[a,e]);return!e||!t?l.createElement("div",null,"Rule not found"):l.createElement(c,{catalogSlug:s.slug,slug:e,data:t,hasTeam:r,hasPublishedAt:u,teamLabel:m})}export{R as RuleDetailPage};
