"use client"; import type { CSSProperties, ReactNode, RefObject } from "react"; import { Dropdown } from "antd"; import { Settings2 } from "lucide-react"; import type { ItemType } from "antd/es/menu/interface"; import { GitHubLink } from "@/components/github-link"; import { AnimatedThemeToggler } from "@/components/ui/animated-theme-toggler"; import { VersionReleaseModal } from "@/components/version-release-modal"; import { cn } from "@/lib/utils"; import type { ThemeName } from "@/stores/use-theme-store"; type UserStatusActionsProps = { version: string; theme: ThemeName; onThemeChange: (theme: ThemeName) => void; onOpenConfig?: () => void; showConfig?: boolean; userName?: string; initial?: string; menuItems: ItemType[]; accountOpen?: boolean; onAccountOpenChange?: (open: boolean) => void; accountRef?: RefObject; getPopupContainer?: (node: HTMLElement) => HTMLElement; avatarClassName?: string; avatarStyle?: CSSProperties; gitHubClassName?: string; gitHubStyle?: CSSProperties; versionStyle?: CSSProperties; userLabel?: ReactNode; iconStyle?: CSSProperties; }; export function UserStatusActions({ version, theme, onThemeChange, onOpenConfig, showConfig = true, userName, initial, menuItems, accountOpen, onAccountOpenChange, accountRef, getPopupContainer, avatarClassName, avatarStyle, gitHubClassName, gitHubStyle, versionStyle, userLabel, iconStyle, }: UserStatusActionsProps) { const avatarText = initial || (userName?.trim()[0] || "U").toUpperCase(); const naturalIconClass = "inline-flex size-8 shrink-0 items-center justify-center text-stone-600 transition hover:text-stone-950 dark:text-stone-300 dark:hover:text-white [&_svg]:size-4"; return (
{showConfig ? ( ) : null}
); }