"use client" import Link from "next/link" import { usePathname } from "next/navigation" import { Camera, LogOut, Plus, X } from "lucide-react" import { AccountAvatar } from "@/components/suite/account-avatar" import { Button } from "@/components/ui/button" import { useAuthLogout } from "@/components/auth/auth-provider" import { useChromeIdentity } from "@/lib/hooks/use-chrome-identity" import { buildOidcLoginUrl } from "@/lib/auth/login-url" export function AccountSwitcherPanel({ onClose }: { onClose: () => void }) { const pathname = usePathname() const identity = useChromeIdentity() const signOut = useAuthLogout() if (!identity) return null const firstName = identity.firstName const addAccountHref = buildOidcLoginUrl({ returnTo: pathname || "/drive", intent: "add_account", }) const handleSignOut = () => { void signOut() onClose() } return ( <>
{identity.email}