import { useEffect } from 'react'; import { useActiveSeed } from './ActiveSeed.js'; import { useBackendConfig } from './backend-config.js'; import { BackendMatrix } from './BackendMatrix.js'; // A real Settings modal — replaces the previous "gear toggles the // classic tab bar" behaviour. Structured into sections the way // Trust/MetaMask do: Wallet, Backends, Display, Advanced. export function SettingsModal({ onClose, onOpenAdvanced, }: { onClose: () => void; onOpenAdvanced: () => void; }): JSX.Element { const { active, setActive } = useActiveSeed(); const { config, toggle: toggleBackend, reset: resetBackend } = useBackendConfig(); useEffect(() => { const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') onClose(); }; window.addEventListener('keydown', onKey); return () => window.removeEventListener('keydown', onKey); }, [onClose]); return (
{hint}
}