import React from 'react';
import {
Accordion,
AccordionSummary,
AccordionDetails,
Typography,
Container,
FormControl,
InputLabel,
Select,
MenuItem,
Checkbox,
FormControlLabel,
} from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import ExpandMoreIcon from '@mui/icons-material/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';
import usePositionAttributes from '../common/attributes/usePositionAttributes';
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 positionAttributes = usePositionAttributes(t);
const [positionItems, setPositionItems] = usePersistedState('positionItems', ['speed', 'address', 'totalDistance', 'course']);
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')}
{t('sharedAttributes')}
setMapLiveRoutes(event.target.checked)} />}
label={t('mapLiveRoutes')}
/>
setMapFollow(event.target.checked)} />}
label={t('deviceFollow')}
/>
setMapCluster(event.target.checked)} />}
label={t('mapClustering')}
/>
);
};
export default PreferencesPage;