"use client" import type { LucideIcon } from "lucide-react" import { cn } from "@/lib/utils" import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group" interface SelectableCardOption { value: string label: string description?: string icon?: LucideIcon } interface SelectableCardGroupProps { options: SelectableCardOption[] value: string onValueChange: (value: string) => void className?: string columns?: 1 | 2 | 3 disabled?: boolean } function SelectableCardGroup({ options, value, onValueChange, className, columns = 2, disabled = false, }: SelectableCardGroupProps) { return ( onValueChange(String(v))} disabled={disabled} className={cn( "grid gap-3", columns === 1 && "grid-cols-1", columns === 2 && "grid-cols-1 sm:grid-cols-2", columns === 3 && "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3", className )} > {options.map((opt) => { const Icon = opt.icon return ( ) })} ) } export { SelectableCardGroup } export type { SelectableCardOption }