'use client'; import { useState } from 'react'; import { JURISDICTION_COLORS, JURISDICTION_LABELS } from '@/lib/constants'; import type { Citation } from '@/lib/types'; interface Props { citations: Citation[]; } export function CitationsPanel({ citations }: Props) { const [open, setOpen] = useState(false); return (
{open ? (
{citations.map(citation => { const color = JURISDICTION_COLORS[citation.jurisdiction] ?? '#888'; return (

Sec {citation.section_id}

{citation.doc_name}

{JURISDICTION_LABELS[citation.jurisdiction] ?? citation.jurisdiction}
Effective {citation.effective_date ?? 'not listed'} Source
); })}
) : null}
); }