import React from 'react';
import {
Accordion, AccordionSummary, AccordionDetails, makeStyles, Typography, Container, FormControl, InputLabel, Select, MenuItem, Checkbox, FormControlLabel,
} from '@material-ui/core';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import { useLocalization, useTranslation } from '../common/components/LocalizationProvider';
import usePersistedState from '../common/util/usePersistedState';
import PageLayout from '../common/components/PageLayout';
import SettingsMenu from './components/SettingsMenu';
const useStyles = makeStyles((theme) => ({
container: {
marginTop: theme.spacing(2),
},
details: {
flexDirection: 'column',
},
}));
const PreferencesPage = () => {
const classes = useStyles();
const t = useTranslation();
const { languages, language, setLanguage } = useLocalization();
const languageList = Object.entries(languages).map((values) => ({ code: values[0], name: values[1].name }));
const [mapLiveRoutes, setMapLiveRoutes] = usePersistedState('mapLiveRoutes', false);
const [mapFollow, setMapFollow] = usePersistedState('mapFollow', false);
const [mapCluster, setMapCluster] = usePersistedState('mapCluster', true);
return (
} breadcrumbs={['settingsTitle', 'sharedPreferences']}>
}>
{t('sharedPreferences')}
{t('loginLanguage')}
}>
{t('mapTitle')}
setMapLiveRoutes(event.target.checked)} />}
label={t('mapLiveRoutes')}
/>
setMapFollow(event.target.checked)} />}
label={t('deviceFollow')}
/>
setMapCluster(event.target.checked)} />}
label={t('mapClustering')}
/>
);
};
export default PreferencesPage;