import{j as n,r as o}from"./vendor-react-DrAK5R0M.js";import{C as a,a as i}from"./index-7eqLqzhB.js";import{B as m}from"./vendor-icons-Cu2Ube6F.js";function d({count:e=0,className:r}){if(e<=0)return null;const t=`${e} confirmed Memory ${e===1?"entry":"entries"}`;return n.jsxs("span",{title:t,"aria-label":t,className:a("inline-flex h-5 items-center gap-1 rounded-full border border-emerald-500/25 bg-emerald-500/10 px-1.5 text-[11px] font-semibold text-emerald-500 dark:text-emerald-300",r),children:[n.jsx(m,{className:"h-3 w-3"}),e>1&&n.jsx("span",{children:e})]})}function x(e){const{data:r}=i({subject_type:e,memory_status:"active",is_current:!0,limit:500});return o.useMemo(()=>{const t=new Map;for(const s of(r==null?void 0:r.data)??[])s.subject_id&&t.set(s.subject_id,(t.get(s.subject_id)??0)+1);return t},[r])}export{d as R,x as u};
