import { type FunctionComponent, memo } from 'react'; import { Arrows, Backspace, Ctrl, Del, Enter, Key, Modal, Space } from '@/components'; import { selectConfig, useTranslate, useTypedSelector } from '@/state'; import { Mapping } from './components'; interface Props { className?: string; isOpen: boolean; onClose: () => void; } const KeyMapModalBase: FunctionComponent = ({ className, isOpen, onClose }) => { const translate = useTranslate(); const config = useTypedSelector(selectConfig); return ( ]} /> , ]} /> ]} /> {config.twoCharacterTiles.length > 0 && ( , <> {config.twoCharacterTiles.map(([firstLetter]) => ( {firstLetter.toUpperCase()} ))} , ], ]} /> )} ]} /> ]} /> , G]]} /> ]} /> ); }; export const KeyMapModal = memo(KeyMapModalBase);