import { useState, useEffect } from 'react'; import { AppBar, Box, Toolbar, IconButton, Typography, Badge, BottomNavigation, BottomNavigationAction, Paper, Avatar, List, ListItem, ListItemAvatar, ListItemText, Fab, TextField, Button, Dialog, DialogTitle, DialogContent, DialogActions, Chip, Card, CardContent, Rating, Grid, Container, ThemeProvider, createTheme, CssBaseline, Drawer, Divider, InputAdornment, Menu, MenuItem, useMediaQuery } from '@mui/material'; import { Home, Chat, School, Translate, Search, Notifications, AccountCircle, Edit, Call, Favorite, ThumbUp, Comment, Share, MoreVert, PhotoCamera, Mic, AttachFile, EmojiEmotions, Language, LocationOn, Settings, Help } from '@mui/icons-material'; // Create custom theme const theme = createTheme({ palette: { primary: { main: '#2196f3', light: '#64b5f6', dark: '#1976d2', }, secondary: { main: '#ff4081', light: '#ff80ab', dark: '#f50057', }, background: { default: '#f5f5f5', paper: '#ffffff', }, }, typography: { fontFamily: '"Inter", "Roboto", "Helvetica", "Arial", sans-serif', h6: { fontWeight: 600, }, subtitle1: { fontWeight: 500, }, }, shape: { borderRadius: 12, }, components: { MuiCard: { styleOverrides: { root: { boxShadow: '0 2px 12px rgba(0,0,0,0.08)', transition: 'transform 0.2s ease-in-out', '&:hover': { transform: 'translateY(-2px)', }, }, }, }, MuiButton: { styleOverrides: { root: { textTransform: 'none', borderRadius: 8, }, }, }, }, }); export default function HelloTalkApp() { const [value, setValue] = useState(0); const isMobile = useMediaQuery(theme.breakpoints.down('sm')); const [anchorEl, setAnchorEl] = useState(null); const moments = []; // Sample moments data const posts = []; // Sample posts data const partners = []; // Sample partners data const handleCorrection = (post) => { // Function to handle correction logic }; const startVoiceCall = (partner) => { // Function to handle starting a voice call }; const [openNewPost, setOpenNewPost] = useState(false); return ( {/* Enhanced App Bar */} HelloTalk setAnchorEl(e.currentTarget)}> {/* Profile Menu */} setAnchorEl(null)} PaperProps={{ elevation: 0, sx: { filter: 'drop-shadow(0px 2px 8px rgba(0,0,0,0.12))', mt: 1.5, }, }} > Profile Language Settings Settings Help & Support {/* Main Content Area */} {value === 0 && ( {/* Story/Moments Section */} Moments {moments.map((moment) => ( {moment.user.name} {moment.caption} ))} {/* Enhanced Posts */} {posts.map((post) => ( {post.user.name} {post.content} {/* Corrections Section */} {post.corrections && ( Language Corrections {post.corrections.map((correction, index) => ( {correction.original} → {correction.corrected} {correction.explanation} ))} )} {/* Action Buttons */} ))} )} {value === 1 && ( // Enhanced Chat Section ), }} /> {partners.map((partner) => ( startVoiceCall(partner)}> } > {partner.name} } secondary={ {partner.nativeLanguage} → {partner.learningLanguage} {partner.location} } /> ))} )} {value === 2 && ( // Enhanced Learning Section Learning Tools Vocabulary Review Master new words and phrases through interactive exercises Grammar Exercises Improve your language structure through interactive lessons {/* Add more learning tools */} )} {/* Enhanced Floating Action Button */} setOpenNewPost(true)} > {/* Enhanced Bottom Navigation */} { setValue(newValue); }} sx={{ height: 65, '& .MuiBottomNavigationAction-root': { color: 'text.secondary', '&.Mui-selected': { color: 'primary.main', }, }, }} > } /> } /> } /> setOpenNewPost(false)}> New Post ); }