"use client"; import Link from "next/link"; import type { ReactNode } from "react"; import { Badge } from "@/components/ui/badge"; import { practiceAreaLabel } from "@/components/precedents/practice-area"; import type { Digest } from "@/lib/api/digests"; import { formatDateShort as formatDate } from "@/lib/format-date"; /** * Presentational card for a single digest ("כל יום" radar entry). * * A digest is a SECONDARY source that POINTS at a ruling — the card makes the * pointer-not-citation nature explicit: the underlying ruling's citation is * shown with a link-status badge (linked → the ruling is in the precedent * library; unlinked → an open knowledge gap, INV-DIG3). */ export function DigestCard({ digest, score, actions, }: { digest: Digest; score?: number; actions?: ReactNode; }) { const linked = Boolean(digest.linked_case_law_id); const pending = digest.extraction_status !== "completed"; return (
{digest.headline_holding}
)} {/* source ruling — "מקור:" + citation, start-bordered (mockup `.ruling`) */}{digest.summary}
)} {digest.practice_area && ( {practiceAreaLabel(digest.practice_area)} )} {digest.subject_tags?.length > 0 && (