"use client";
import {
PRESET_ORDER,
PRESETS,
type PresetId,
} from "yt-dlp-transcript-common/lib/homepageChart";
// The primary control: named preset chips that each set a full, valid chart
// state. A "Custom" chip lights up once any Customize control diverges from a
// preset.
export function PresetBar({
active,
onSelect,
}: {
active: PresetId | "custom";
onSelect: (id: PresetId) => void;
}) {
return (
{PRESET_ORDER.map((id) => {
const on = active === id;
return (
);
})}
{active === "custom" && (
Custom
)}