const createSignal = (value: T): [() => T, (next: T) => void] => { let current = value; return [ () => current, (next) => { current = next; }, ]; }; import { SyncStatus } from "./SyncStatus"; import { useTheme } from "@/context/ThemeContext"; import { useInputFocusNav } from "@/hooks/useInputFocusNav"; export function ExportDialog() { const { theme } = useTheme(); const filename = createSignal("podcast-sync.json"); const format = createSignal<"json" | "xml">("json"); // Yield navigation keybinds to the Shell router while the input is focused. const filenameRef = useInputFocusNav(); return ( File: Format: format[1](index === 0 ? "json" : "xml")} /> Export {format[0]()} to {filename[0]()} ); }