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';
import classNames from 'classnames';
import { useT } from '../../lib/use-t';
export const Settings = () => {
const t = useT();
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')}
{process.env.GIT_TAG && (
<>
- {t('Version')}
- {process.env.GIT_TAG}
>
)}
- {t('Git commit hash')}
- {process.env.GIT_COMMIT}
);
};
const SettingsGroup = ({
label,
helpText,
children,
inline = true,
}: {
label: string;
children: ReactNode;
helpText?: string;
inline?: boolean;
}) => {
return (
{helpText &&
{helpText}
}
{children}
);
};