import React, { useState, useEffect } from 'react'; import { Bell, Key, MapPin, Settings, Play, Bookmark, ArrowUpRight, CheckCircle, Bluetooth, TriangleAlert, Volume2, Mic, ChevronLeft, Pause } from 'lucide-react'; export default function App() { const [currentScreen, setCurrentScreen] = useState('lock'); const [isPlaying, setIsPlaying] = useState(false); const [isSaved, setIsSaved] = useState(false); // Helper to reset states when changing screens const navigate = (screen) => { setIsPlaying(false); setCurrentScreen(screen); }; // 1. Lock Screen (Push Notification) const LockScreen = () => (

10:00

Sunday, 16 July

{/* The Push Notification */}

Swipe up to unlock

); // 2. Home Dashboard const HomeScreen = () => (

Smart Estate B2

); // 3. Notice List const NoticeListScreen = () => (

Notices

); // 4. Voice Notice Detail (Your task!) const NoticeDetailScreen = () => (

Building Water Outage

{/* Big Play Button */} {/* Audio Waveform Simulation */}
{[1, 2, 3, 4, 5, 6, 7].map((bar) => (
))}

"Attention residents. Water supply will be suspended on July 16th from 10:00 AM to 2:00 PM for pipe maintenance."

{/* Save for later button */}
); // 5. Digital Key (Scanning) const DigitalKeyScreen = () => { useEffect(() => { if (currentScreen === 'digitalKey') { const timer = setTimeout(() => navigate('digitalKeySuccess'), 3000); return () => clearTimeout(timer); } }, [currentScreen]); return (

Approaching Gate...

Hands-free unlocking active. Please stand near the scanner.

); }; // 6. Digital Key (Success) const DigitalKeySuccessScreen = () => (

Access Granted

Main Entrance Open

{/* Visual audio cue */}
"Gate Opened"
); // 7. Voice Map Setup const VoiceMapScreen = () => (

Voice Map

Speak your destination

"Take me to the mailbox"

Quick Routes

); // 8. Active Navigation const NavigationActiveScreen = () => (

Navigating to

Mailbox

Connected
{/* Audio Waveform */}
{[1, 2, 3, 4, 5].map((bar) => (
))}

The mailbox is at your 3 o'clock position.

10 steps remaining.

); // 9. Navigation Warning (Off Route) const NavigationWarningScreen = () => (

Off Route Warning

"Ding Ding! You have deviated from the path. Stop walking."

); // Settings Dashboard const SettingsScreen = () => (

Accessibility

Voice-Over Speed

Slow Fast

High Contrast Mode

Enhance colors
); return (
{/* Mobile Phone Mockup Frame */}
{/* Screen Content */}
{currentScreen === 'lock' && } {currentScreen === 'home' && } {currentScreen === 'noticeList' && } {currentScreen === 'noticeDetail' && } {currentScreen === 'digitalKey' && } {currentScreen === 'digitalKeySuccess' && } {currentScreen === 'voiceMap' && } {currentScreen === 'navigationActive' && } {currentScreen === 'navigationWarning' && } {currentScreen === 'settings' && } {/* Persistent Home Indicator */} {currentScreen !== 'lock' && (
)}
); }