"use client"; import type { ReactNode } from "react"; import { cn } from "@multica/ui/lib/utils"; /** A pill-button group for picking between mutually exclusive modes: the active * option lifts to the background, the rest stay muted. One control for every * either/or, so switching mode always looks and works the same wherever it * appears. */ export function SegmentedToggle({ value, options, onChange, buttonClassName, }: { value: T; options: ReadonlyArray; onChange: (value: T) => void; /** Overrides the compact default sizing (text-xs px-2 py-1). */ buttonClassName?: string; }) { return (
{options.map(([key, label]) => ( ))}
); }