"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { cn } from "@/lib/utils"; import { YaltopiaFooter } from "./YaltopiaFooter"; import type { LucideIcon } from "lucide-react"; import { Bell, Search, Settings, Trophy, LogOut, } from "lucide-react"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { createClient } from "@/lib/supabase/client"; import { useRouter } from "next/navigation"; export type NavItem = { href: string; label: string; icon: LucideIcon }; export function DashboardShell({ brand, navItems, user, children, }: { brand: string; navItems: NavItem[]; user: { name: string; email: string }; children: React.ReactNode; }) { const pathname = usePathname(); const router = useRouter(); const initials = user.name .split(" ") .map((n) => n[0]) .join("") .slice(0, 2) .toUpperCase(); async function signOut() { const supabase = createClient(); await supabase.auth.signOut(); router.push("/"); router.refresh(); } return (