"use client"; import { useId, useState } from "react"; import { DURATION_KEEP, formatBaseValue, formatRate, perDayRate, splitDuration, toBaseUnit, unitLabel, type DurationUnit, } from "yt-dlp-transcript-common/lib/duration"; // Its controlled selects sit inside action forms, whose reset they would not // survive alone (forms/Controlled.tsx). import { ControlledSelect } from "./forms/Controlled"; // A cadence control: pick a preset, or type an amount and choose a unit. // // Every duration in this app is stored as a bare integer in one fixed unit, and // the forms used to expose that integer directly — so setting a weekly sweep // meant knowing that 10080 is a week. This renders the same integer as an // amount + unit pair with the raw value echoed underneath, so nothing is hidden // from someone who also reads settings.json. // // Deliberately built on a native rather than // the (unused) shadcn/Radix Select: Radix renders a