'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { cn } from '@/app/_lib/utils'; import { Skeleton } from './ui/skeleton'; import { Avatar, AvatarFallback } from './ui/avatar'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from './ui/dropdown-menu'; import { PORTAL_THEMES, type PortalTheme, initials } from './portal-theme'; import { ChevronsUpDown, LogOut } from 'lucide-react'; export interface PortalNavItem { href: string; label: string; icon: React.ReactNode; } interface PortalUser { name?: string | null; email?: string | null; role?: string | null; subtitle?: string | null; } interface PortalShellProps { portalName: string; theme: PortalTheme; navItems: PortalNavItem[]; user?: PortalUser; loading: boolean; authed: boolean; onLogout: () => void; children: React.ReactNode; } export function PortalShell({ portalName, theme, navItems, user, loading, authed, onLogout, children, }: PortalShellProps) { const pathname = usePathname(); const t = PORTAL_THEMES[theme]; return (