"use client"; import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Bell, X, CheckCircle, AlertCircle, Info, Calendar, Clock, } from "lucide-react"; import { cn } from "@/lib/utils"; export interface Notification { id: string; type: "success" | "warning" | "info" | "appointment"; title: string; message: string; time: string; read: boolean; } interface NotificationsProps { notifications: Notification[]; onMarkAsRead?: (id: string) => void; onDismiss?: (id: string) => void; onMarkAllAsRead?: () => void; } export function Notifications({ notifications, onMarkAsRead, onDismiss, onMarkAllAsRead, }: NotificationsProps) { const unreadCount = notifications.filter((n) => !n.read).length; const getIcon = (type: Notification["type"]) => { switch (type) { case "success": return ; case "warning": return ; case "info": return ; case "appointment": return ; } }; const getBgColor = (type: Notification["type"]) => { switch (type) { case "success": return "bg-[#4A90A4]/10 border-[#4A90A4]/30"; case "warning": return "bg-rose-100 border-rose-300"; case "info": return "bg-pink-50 border-pink-200"; case "appointment": return "bg-gradient-to-br from-rose-50 to-pink-50 border-rose-300"; } }; return (
{/* Header */}

Notifications

{unreadCount > 0 && ( {unreadCount} )}
{unreadCount > 0 && onMarkAllAsRead && ( )}
{/* Notifications List */}
{notifications.length === 0 ? (

No notifications

) : ( notifications.map((notification) => (
{getIcon(notification.type)}

{notification.title}

{notification.message}

{notification.time}
{!notification.read && onMarkAsRead && ( )} {onDismiss && ( )}
)) )}
); } // Notification Bell Component for Header export function NotificationBell({ count, onClick, }: { count: number; onClick: () => void; }) { return ( ); }