import { Link, useLocation } from "react-router-dom"; import { cn } from "@/lib/utils"; import { useAuth } from "@/contexts/AuthContext"; import { Music2, Users, FileText, Settings, ChevronLeft, Headphones, } from "lucide-react"; interface EthosLayoutProps { children: React.ReactNode; } interface NavItem { name: string; href: string; icon: React.ElementType; memberOnly?: boolean; } const NAV_ITEMS: NavItem[] = [ { name: "Library", href: "/ethos/library", icon: Headphones }, { name: "Artists", href: "/ethos/artists", icon: Users }, { name: "Licensing", href: "/ethos/licensing", icon: FileText, memberOnly: true }, { name: "Settings", href: "/ethos/settings", icon: Settings, memberOnly: true }, ]; export default function EthosLayout({ children }: EthosLayoutProps) { const location = useLocation(); const { user } = useAuth(); const isActive = (href: string) => location.pathname.startsWith(href); return (
{/* Top bar */}
{/* Purple accent stripe */}
{/* Back to main site */} (e.currentTarget.style.color = "rgba(168,85,247,0.9)")} onMouseLeave={e => (e.currentTarget.style.color = "rgba(168,85,247,0.5)")} > aethex.dev {/* Brand */}
Ethos Guild {/* Nav tabs */} {/* Sign in prompt for guests */} {!user && ( { e.currentTarget.style.background = "rgba(168,85,247,0.1)"; e.currentTarget.style.borderColor = "rgba(168,85,247,0.7)"; }} onMouseLeave={e => { e.currentTarget.style.background = "transparent"; e.currentTarget.style.borderColor = "rgba(168,85,247,0.4)"; }} > JOIN GUILD )}
{/* Page content */}
{children}
); }