"use client"; import * as React from "react"; import { cn } from "./lib/utils"; export interface CheckboxCardProps extends React.HTMLAttributes { title: string; description?: string; checked?: boolean; defaultChecked?: boolean; onCheckedChange?: (checked: boolean) => void; disabled?: boolean; } /** Card-style checkbox: selectable frame + description + checkmark. */ export function CheckboxCard({ title, description, checked, defaultChecked, onCheckedChange, disabled, className, ...props }: CheckboxCardProps) { const [internal, setInternal] = React.useState(defaultChecked ?? false); const isOn = checked ?? internal; const toggle = () => { if (disabled) return; const next = !isOn; setInternal(next); onCheckedChange?.(next); }; return ( ); }