'use client'; import { Dialog, DialogContent, DialogHeader, DialogTitle, } from '@/components/ui/dialog'; interface ShortcutItem { keys: string[]; description: string; } interface ShortcutGroup { title: string; shortcuts: ShortcutItem[]; } const shortcutGroups: ShortcutGroup[] = [ { title: 'Navigation', shortcuts: [ { keys: ['Ctrl', 'K'], description: 'Open search' }, ], }, { title: 'Playback', shortcuts: [ { keys: ['Space', 'K'], description: 'Play / Pause' }, { keys: ['M'], description: 'Mute / Unmute' }, ], }, { title: 'Seeking', shortcuts: [ { keys: ['←'], description: 'Seek back 5s' }, { keys: ['→'], description: 'Seek forward 5s' }, { keys: ['J'], description: 'Seek back 10s' }, { keys: ['L'], description: 'Seek forward 10s' }, ], }, { title: 'Speed', shortcuts: [ { keys: ['↑'], description: 'Increase speed' }, { keys: ['↓'], description: 'Decrease speed' }, { keys: ['⇧', '>'], description: 'Increase speed' }, { keys: ['⇧', '<'], description: 'Decrease speed' }, ], }, ]; interface KeyboardShortcutsModalProps { open: boolean; onOpenChange: (open: boolean) => void; } export function KeyboardShortcutsModal({ open, onOpenChange }: KeyboardShortcutsModalProps) { return ( Keyboard Shortcuts
{shortcutGroups.map((group) => (

{group.title}

{group.shortcuts.map((shortcut, i) => (
{shortcut.description}
{shortcut.keys.map((key, j) => ( {key} ))}
))}
))}
); }