"use client"; import { useState } from "react"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { Button } from "@/components/ui/button"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; import { Inbox, Calendar, LayoutGrid, Heart, UserCog, Bell, Settings, LogOut, } from "lucide-react"; export function Header() { const pathname = usePathname(); const router = useRouter(); const [notificationsOpen, setNotificationsOpen] = useState(false); const [userMenuOpen, setUserMenuOpen] = useState(false); // Mock notifications data const notifications = [ { id: 1, title: "New appointment scheduled", message: "John Smith booked an appointment for tomorrow", time: "2 hours ago", type: "info", read: false, }, { id: 2, title: "Payment received", message: "Payment of $150 received from Jane Doe", time: "5 hours ago", type: "success", read: false, }, ]; const unreadCount = notifications.filter((n) => !n.read).length; return (
{/* Logo */}
Attune Heart {/* Navigation Links */} {/* Right Side Actions */}
{/* Thumbtack Design at Top Right */}

Notifications

{unreadCount > 0 && ( {unreadCount} new )}
{notifications.length === 0 ? (

No notifications

) : (
{notifications.map((notification) => { return (

{notification.title}

{!notification.read && ( )}

{notification.message}

{notification.time}

); })}
)}
setNotificationsOpen(false)} className="block w-full text-center text-sm font-medium text-rose-600 hover:text-rose-700 hover:underline transition-colors" > View all notifications
{/* Thumbtack Design at Top Right */}
); }