'use client'; import { useState } from 'react'; import { Bell, X, ArrowRight, Package, DollarSign, Bike, AlertCircle, CheckCircle } from 'lucide-react'; const mockNotifications = [ { id: '1', type: 'rental', title: 'New Rental Started', message: 'Your bike AB-1234 has been rented by rider MR-456', time: '5 min ago', read: false, }, { id: '2', type: 'earning', title: 'Earning Credited', message: '৳450 has been added to your wallet from bike CD-5678', time: '2 hours ago', read: false, }, { id: '3', type: 'success', title: 'Withdrawal Complete', message: 'Your withdrawal of ৳5,000 has been processed successfully', time: '1 day ago', read: true, }, { id: '4', type: 'alert', title: 'Maintenance Alert', message: 'Bike XY-9012 requires maintenance attention', time: '2 days ago', read: true, }, ]; const iconMap: Record = { rental: Bike, earning: DollarSign, success: CheckCircle, alert: AlertCircle, default: Package, }; export default function InvestorNotification({ isMobile = false }: { isMobile?: boolean }) { const [isOpen, setIsOpen] = useState(false); const [notifications] = useState(mockNotifications); const unreadCount = notifications.filter(n => !n.read).length; if (isMobile) { return (

JAIBEN

Investor
{isOpen && ( <>
setIsOpen(false)} />

Notifications

{notifications.map((notif) => { const Icon = iconMap[notif.type] || iconMap.default; return (

{notif.title}

{notif.message}

{notif.time}

{!notif.read && (
)}
); })}
)}
); } return (

Notifications

{unreadCount > 0 && ( {unreadCount} new )}
{notifications.map((notif) => { const Icon = iconMap[notif.type] || iconMap.default; return (

{notif.title}

{notif.message}

{notif.time}

{!notif.read && (
)}
); })}
); }