"use client"; import { useSession, signOut } from "next-auth/react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import LanguageSwitcher from "./LanguageSwitcher"; export default function Sidebar({ dict, lang }: { dict: any; lang: string }) { const { data: session } = useSession(); const pathname = usePathname(); const role = session?.user?.role ?? ""; const name = session?.user?.name ?? ""; const email = session?.user?.email ?? ""; const navItems = [ { section: dict.sidebar?.general || "GENEL", items: [ { href: `/${lang}/dashboard`, label: dict.dashboard?.title || "Dashboard", icon: HomeIcon, roles: ["SUPER_ADMIN", "DOMAIN_ADMIN"] }, { href: `/${lang}/dashboard/mail`, label: dict.sidebar?.mailClient || "Mail Client", icon: InboxIcon, roles: ["SUPER_ADMIN", "DOMAIN_ADMIN"] }, ], }, { section: dict.sidebar?.management || "YÖNETİM", items: [ { href: `/${lang}/dashboard/domains`, label: dict.domains?.title || "Domainler", icon: GlobeIcon, roles: ["SUPER_ADMIN"] }, { href: `/${lang}/dashboard/users`, label: dict.sidebar?.users || "Kullanıcılar", icon: UsersIcon, roles: ["SUPER_ADMIN", "DOMAIN_ADMIN"] }, { href: `/${lang}/dashboard/mappings`, label: dict.sidebar?.mappings || "Eşleştirmeler", icon: LinkIcon, roles: ["SUPER_ADMIN", "DOMAIN_ADMIN"] }, { href: `/${lang}/dashboard/mailboxes`, label: dict.sidebar?.mailboxes || "Mail Hesapları", icon: MailIcon, roles: ["SUPER_ADMIN", "DOMAIN_ADMIN"] }, { href: `/${lang}/dashboard/logs`, label: dict.sidebar?.logs || "Loglar", icon: ListIcon, roles: ["SUPER_ADMIN"] }, ], }, ]; return ( ); } // Icons function HomeIcon() { return ( ); } function GlobeIcon() { return ( ); } function UsersIcon() { return ( ); } function MailIcon() { return ( ); } function InboxIcon() { return ( ); } function LogOutIcon() { return ( ); } function LinkIcon() { return ( ); } function ListIcon() { return ( ); }