import { useState } from "react"; const LABELS: Record = { back: "Go back", exit: "Exit", other: "Other — specify" }; export function ReservedControls({ reserved, onControl, }: { reserved?: string[]; onControl: (c: string, text?: string) => void; }) { const [otherOpen, setOtherOpen] = useState(false); const [text, setText] = useState(""); if (!reserved?.length) return null; return (
{reserved.map((c) => ( ))}
{otherOpen && (