import { useState } from 'react'; import { BarChart, Activity, Users, Zap, Clock, Filter, Download, Search, Bell, Home, CreditCard, Settings, Plus, Edit, Trash, ChevronDown, Power, History, ExternalLink, HelpCircle, AlertCircle, ChevronRight, Tag, Gift, Sparkles, Timer, Shield, Percent } from 'lucide-react'; export default function UserInterface() { const [activeTab, setActiveTab] = useState('home'); const [activePage, setActivePage] = useState('dashboard'); const [showCustomerModal, setShowCustomerModal] = useState(false); const [showMeterModal, setShowMeterModal] = useState(false); const renderPage = () => { switch(activePage) { case 'dashboard': return ; case 'customers': return ; case 'meters': return ; case 'payments': return ; case 'admin': return ; default: return ; } }; return (
{/* Top Navigation */} {/* Sidebar */}
EP Logo

Equatorial Power

{/* Bottom Navigation (Mobile) */}
} text="Home" active={activeTab === 'home'} onClick={() => setActiveTab('home')} /> } text="Pay" active={activeTab === 'pay'} onClick={() => setActiveTab('pay')} /> } text="Usage" active={activeTab === 'usage'} onClick={() => setActiveTab('usage')} /> } text="Account" active={activeTab === 'account'} onClick={() => setActiveTab('account')} />
{/* Main Content */}
{activeTab === 'home' && } {activeTab === 'pay' && } {activeTab === 'usage' && } {activeTab === 'account' && } {renderPage()}
{/* Modals */} {showCustomerModal && setShowCustomerModal(false)} />} {showMeterModal && setShowMeterModal(false)} />}
); } const NavButton = ({ icon, text, active, onClick }) => ( ); // Navigation Item Component const NavItem = ({ icon, text, active, onClick }) => ( ); // Dashboard Page Component const DashboardPage = () => (
{/* Stats Grid */}
} title="Total Customers" value="2,451" color="green" /> } title="Active Meters" value="1,987" color="blue" /> } title="Energy Usage" value="45.2 kWh" color="yellow" /> } title="Pending Tickets" value="12" color="purple" />
{/* Recent Activity */}

Recent Activity

Customer Action Status Time
John Doe Payment Received Completed 2 minutes ago
Sarah Smith Meter Registration Pending 15 minutes ago
Mike Johnson Support Ticket In Progress 1 hour ago
); // Customers Page Component const CustomersPage = () => (
{/* Add customer rows here */}
Name ID Status Last Payment Actions
); // Meters Page Component const MetersPage = () => (
{/* Meter Cards */} {/* Add more meter cards */}
); // Payments Page Component const PaymentsPage = () => (

New Payment

Recent Transactions

{/* Add transaction rows here */}
Transaction ID Customer Amount Status Date
); // Admin Page Component const AdminPage = () => (

User Management

System Settings

); // Utility Components const StatCard = ({ icon, title, value, color }) => (
{icon}

{title}

{value}

); const MeterCard = ({ id, customer, status, consumption }) => (

Meter {id}

{customer}

{status}

Consumption: {consumption}

); const HomeView = () => (
{/* Current Usage Card */}

Current Usage

This Month

Active

245 kWh

Last updated: 2 mins ago

{/* New Special Offers Section */}

Special Offers

{/* Early Payment Discount Offer */}
Limited Time Offer

Early Payment Discount

Pay before the 15th and get 10% off your bill

{/* Referral Bonus Offer */}
Referral Program

Refer & Earn

Get $20 credit for each new customer referral

{/* Loyalty Program Card */}

EP Rewards Program

Earn points with every payment

700 points 1000 points for next reward
{/* Quick Actions */}
{/* Special Benefits Section */}
} title="Protected Rate" description="Lock in your current rate for 6 months" /> } title="Bundle Discount" description="Save 15% with our service bundle" /> } title="Peak Hours Savings" description="50% off during off-peak hours" /> } title="Welcome Bonus" description="$30 credit for new customers" />
{/* Recent Transactions and Alerts remain the same */}

Recent Transactions

Usage Alert

Your usage is 15% higher than last month. Click here for energy-saving tips.

); const PaymentView = () => (

Make a Payment

Payment History

{/* Add payment history items here */}
); const UsageView = () => (

Usage History

{/* Add usage graph here */}
{/* Placeholder for usage graph */}
Last 7 Days Total: 245 kWh
); const AccountView = () => (
User avatar

John Doe

Account #: EP-12345

} title="Account Settings" subtitle="Update your personal information" /> } title="Notifications" subtitle="Manage your notification preferences" /> } title="Help & Support" subtitle="Get help with your account" /> } title="Sign Out" subtitle="Log out of your account" />
); const TransactionItem = ({ date, amount, type, status }) => (

{type}

{date}

{amount}

{status === 'success' ? 'Successful' : 'Failed'}

); const AccountMenuItem = ({ icon, title, subtitle }) => ( ); // Benefits Card Component const BenefitCard = ({ icon, title, description }) => (
{React.cloneElement(icon, { className: "h-5 w-5 text-gray-600" })}

{title}

{description}

); // Promotion Card Component const PromotionCard = ({ title, description, validUntil, discount, bgColor }) => (

{title}

{description}

Valid until: {validUntil}

{discount}
); // Promotions Page Component const PromotionsPage = () => (

Current Promotions

);