import { cn } from "@/lib/utils"; /* Controllo segmentato (Month/Quarter/Year, EUR/USD, EN/IT, chiaro/scuro). */ export interface SegmentedOption { value: T; label: React.ReactNode; ariaLabel?: string; } export function Segmented({ value, onChange, options, size = "md", className, ariaLabel, }: { value: T; onChange: (v: T) => void; options: SegmentedOption[]; size?: "sm" | "md"; className?: string; ariaLabel?: string; }) { return (
{options.map((o) => { const active = o.value === value; return ( ); })}
); }