import { ButtonProps, DropdownItemProps, DropdownPopoverProps } from '@heroui/react'; import { ReactElement, ReactNode } from 'react'; import { AthenaAuthUiOptions } from '../../../lib/auth/core/ui-options.js'; /** Auth states a `UserButton` link can be visible in. */ export type UserButtonLinkVisibility = "authenticated" | "unauthenticated" | "always"; /** A simple link entry rendered as a `Dropdown.Item` in the `UserButton` menu. */ export interface UserButtonLink { /** Destination URL. */ href: string; /** Optional leading icon. Sized/coloured to match built-in items. */ icon?: ReactNode; /** Visible label. */ label: ReactNode; /** Forwarded to the underlying `Dropdown.Item`. */ variant?: DropdownItemProps["variant"]; /** * When this link is visible based on auth state. * @default "always" */ visibility?: UserButtonLinkVisibility; } export interface UserButtonProps { className?: string; /** Hide the built-in "Settings" link. Useful when replacing it via `links`. */ hideSettings?: boolean; /** Additional menu entries rendered above the built-in items. */ links?: (UserButtonLink | ReactElement)[]; /** * The placement of the element with respect to its anchor element. * @default "bottom" */ placement?: DropdownPopoverProps["placement"]; size?: "default" | "icon"; ui?: AthenaAuthUiOptions; variant?: ButtonProps["variant"]; } /** * Render a user account dropdown button that shows account actions. * * @param className - Additional CSS classes applied to the trigger element * @param placement - Dropdown popover placement (e.g., "bottom", "top-start", "bottom-end") * @param size - "icon" renders an avatar-only trigger; "default" renders a button with label and chevron * @param variant - Button visual variant passed to the underlying Button component * @param links - Additional menu entries rendered above the built-in items * @param hideSettings - Hide the built-in "Settings" link * @returns The user button and its dropdown menu as a JSX element */ export declare function UserButton({ className, placement, size, variant, links, hideSettings, ui }: UserButtonProps): import("react").JSX.Element;