import type { ReactNode } from "react"; import Link from "next/link"; import { Badge } from "@/components/ui/badge"; import { StatusBadge } from "@/components/cases/status-badge"; import { StatusRail } from "@/components/cases/status-rail"; import { CaseArchiveAction } from "@/components/cases/case-archive-action"; import { CreateRepoButton } from "@/components/cases/create-repo-button"; import { PRACTICE_AREA_LABELS, APPEAL_SUBTYPE_LABELS, isBlamSubtype, } from "@/lib/practice-area"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; import { Users } from "lucide-react"; import type { CaseDetail } from "@/lib/api/cases"; /** * Case header — parchment band (IA-redesign mockup 17): full-bleed band with * the case title + status/type chips inline, a parties line, the case actions * (edit / archive / repo / sync), and a metadata strip. The `tabs` slot renders * the tab strip inside the band, anchored to its bottom edge. */ export function CaseHeader({ caseNumber, data, actions, tabs, }: { caseNumber: string; data?: CaseDetail; actions?: ReactNode; tabs?: ReactNode; }) { const appellants = data?.appellants?.filter(Boolean) ?? []; const respondents = data?.respondents?.filter(Boolean) ?? []; const hasParties = appellants.length > 0 || respondents.length > 0; const isBlam = data?.proceeding_type === 'בל"מ' || isBlamSubtype(data?.appeal_subtype); return (