"use client"; import type { LucideIcon } from "lucide-react"; import { cn } from "@/app/lib/utils"; export interface SegmentedToggleOption { value: T; label: string; icon?: LucideIcon; } interface ModalSegmentedToggleProps { value: T; onChange: (value: T) => void; options: SegmentedToggleOption[]; disabled?: boolean; size?: "sm" | "md"; className?: string; } export function ModalSegmentedToggle({ value, onChange, options, disabled = false, size = "md", className, }: ModalSegmentedToggleProps) { return (
{options.map((option) => { const Icon = option.icon; const active = option.value === value; return ( ); })}
); }