import { FC } from 'react'; import { Sidebar } from '@excalidraw/excalidraw'; import { z } from 'zod'; import SidebarBase, { SidebarBasePropsSchema } from './Base'; import { Switch, FormControlLabel, FormGroup } from '@mui/material'; import { useAtom } from 'jotai'; import { LoggerStateAtom } from '@/atoms/debug'; import { useTranslation } from 'react-i18next'; export type GeneralSidebarProps = z.infer; export const GeneralSidebarPropsSchema = z .object({}) .merge(SidebarBasePropsSchema); const GeneralSidebar: FC = (props) => { const { t } = useTranslation(); const [loggerState, setLoggerState] = useAtom(LoggerStateAtom); return ( {t('general-settings')} setLoggerState?.(e.target.checked)} /> } label={t('toggle-debug-mode')} /> ); }; export default GeneralSidebar;