"use client"; import { useId } from "react"; export type ChecklistItem = { id: string; label: string; description?: string; checked: boolean; disabled?: boolean; }; export function Checklist({ items, onChange, label = "Checklist", className = "", }: { items: readonly ChecklistItem[]; onChange: (id: string, checked: boolean) => void; label?: string; className?: string; }) { const id = useId(), done = items.filter((i) => i.checked).length; return (
); }