/** * @ai-summary Settings page component for desktop application */ import React, { useState } from 'react'; import { useAuth0 } from '@auth0/auth0-react'; import { useUnits } from '../core/units/UnitsContext'; import { Box, Typography, Switch, Divider, Avatar, List, ListItem, ListItemIcon, ListItemText, ListItemSecondaryAction, Button as MuiButton, Select, MenuItem, FormControl } from '@mui/material'; import AccountCircleIcon from '@mui/icons-material/AccountCircle'; import NotificationsIcon from '@mui/icons-material/Notifications'; import PaletteIcon from '@mui/icons-material/Palette'; import SecurityIcon from '@mui/icons-material/Security'; import StorageIcon from '@mui/icons-material/Storage'; import { Card } from '../shared-minimal/components/Card'; export const SettingsPage: React.FC = () => { const { user, logout } = useAuth0(); const { unitSystem, setUnitSystem } = useUnits(); const [notifications, setNotifications] = useState(true); const [emailUpdates, setEmailUpdates] = useState(false); const [darkMode, setDarkMode] = useState(false); const handleLogout = () => { logout({ logoutParams: { returnTo: window.location.origin } }); }; return ( Settings {/* Account Section */} Account {user?.name?.charAt(0) || user?.email?.charAt(0)} {user?.name || 'User'} {user?.email} Verified account Edit Manage {/* Notifications Section */} Notifications setNotifications(e.target.checked)} color="primary" /> setEmailUpdates(e.target.checked)} color="primary" /> {/* Appearance & Units Section */} Appearance & Units setDarkMode(e.target.checked)} color="primary" /> {/* Data & Storage Section */} Data & Storage Export Clear {/* Account Actions */} Account Actions Sign Out Delete Account ); };