import { t } from '@vegaprotocol/i18n'; import { Dialog, Intent, Switch, ToastPositionSetter, TradingButton, } from '@vegaprotocol/ui-toolkit'; import { useThemeSwitcher } from '@vegaprotocol/react-helpers'; import { useTelemetryApproval } from '../../lib/hooks/use-telemetry-approval'; import { useState, type ReactNode } from 'react'; export const Settings = () => { const { theme, setTheme } = useThemeSwitcher(); const [isApproved, setIsApproved] = useTelemetryApproval(); const [open, setOpen] = useState(false); return (
setTheme()} checked={theme === 'dark'} /> setIsApproved(isOn ? 'true' : 'false')} checked={isApproved === 'true'} /> { setOpen(true); }} > {t('Reset')}

{t( 'You will lose all persisted settings and you will be logged out.' )}

{t('Are you sure you want to reset all settings to default?')}

{ localStorage.clear(); window.location.reload(); }} > {t('Yes, clear cache and refresh')} { setOpen(false); }} > {t('No, keep settings')}
); }; const SettingsGroup = ({ label, helpText, children, }: { label: string; helpText?: string; children: ReactNode; }) => { return (
{helpText &&

{helpText}

}
{children}
); };