import type { ReactNode } from "react"
import type { CommandPalettePrefix } from "./commandPaletteSections.ts"
const renderKey = (name: string): ReactNode => (
{name}
)
/**
* The default strip under the list: the keys, and each prefix with
* its target.
*
* The keys are words — `Up`, `Down` — not arrow glyphs, because a font
* without the glyph paints nothing
* (`2026-07-29-ship-no-icons-and-no-symbol-glyphs.md`). In the Narrow
* View the key hints give way, since a phone has no arrow keys, and
* the prefixes stay: they work from a phone keyboard too.
*/
export const CommandPaletteFooter = ({
prefixes,
}: {
prefixes: readonly CommandPalettePrefix[]
}): ReactNode => (
<>
{renderKey("Up")} {renderKey("Down")} move
{renderKey("Enter")} open
{renderKey("Ctrl")} {renderKey("Enter")} new tab
{prefixes.map(({ label, prefix }) => (
{renderKey(prefix)} {label}
))}
{renderKey("Esc")} close
>
)