import type { ReactElement } from "react"; import { type ColorTokens, type ViewStyle, type TextStyle, type LayoutStyle } from "../../style/index.js"; import type { DropdownItem, DropdownProps } from "../dropdown/dropdown.shared.js"; import { type AvatarSkin } from "./avatar.shared.js"; /** * The identity-pill entries an AvatarMenu skin adds to the Avatar skin family. * The shared shell owns anatomy and state; the skin carries the renderer's metrics. * The menu surface itself uses the injected platform Dropdown. */ export interface AvatarMenuSkin extends AvatarSkin { /** Capsule metrics: height, gap, start/end padding. */ menuPill: ViewStyle; /** Avatar-only compact trigger metrics. */ menuPillCompact: ViewStyle; /** Capsule fill, at rest and while hovered or open, from the theme tokens. */ menuPillFill: (t: ColorTokens, active: boolean) => ViewStyle; /** The capsule's resting edge (width and colour). */ menuPillEdge: (t: ColorTokens) => ViewStyle; /** Optional disc decoration; the generic renderer leaves it empty. */ menuDiscGlow: (t: ColorTokens, glass: boolean) => ViewStyle; /** Whether the pill takes its fill under a hovering pointer: the web's, since native * pointer hover waits on the owner (declared through webHover). */ menuHover: boolean; /** The name line's type (size / line-height / weight / tracking). */ menuPillName: TextStyle; /** The secondary (email) line's type. */ menuPillSecondary: TextStyle; /** Trailing chevron glyph size, in px. */ menuChevronSize: number; /** Disabled foreground opacity, matching the platform's trigger convention. */ menuDisabledOpacity: number; } export interface AvatarMenuProps { /** Original Argus account control with a 32px orchid disc and compact role menu. */ account?: boolean; /** Explicit name for the trigger. */ triggerLabel?: string; /** Menu heading and accessible name, independent of the account's identity lines. */ menuLabel?: string; menuWidth?: number; maxHeight?: number; /** The account holder's full name: the pill's first line, the avatar's initials * fallback and colour identity, and the menu header's title. */ name?: string; /** The secondary line under the name in the pill, and the menu header's * description (typically the account's email address). */ email?: string; /** The account photo. Falls back to the initials exactly like `Avatar`. */ src?: string; /** Ready-made initials for the avatar, used verbatim when there is no photo. */ initials?: string; /** The menu rows, top to bottom. Same rows as `Dropdown` (icon, shortcut, * destructive, disabled, separatorBefore). */ items: DropdownItem[]; /** Avatar and chevron only, no name block: the topbar form of the pill. */ compact?: boolean; /** Hang the menu from the pill's LEADING edge instead of its trailing one. */ alignStart?: boolean; /** The default, spelled out: the menu's trailing edge meets the pill's. */ alignEnd?: boolean; /** Dimmed, non-opening pill: the menu never opens and the press is inert. */ disabled?: boolean; /** * Draw the menu open and in flow under the pill instead of floating it over the page, * a specimen of the account menu (Dropdown's `inline`): the pill reads as open and its * press is inert, a row still fires `onSelect`, and `open` / `onOpenChange` have no * effect. */ inline?: boolean; /** Controlled open state. Omit for uncontrolled (the pill opens/closes it). */ open?: boolean; /** Fired when the open state changes (pill press, row select, dismissal). */ onOpenChange?: (open: boolean) => void; /** Fired with the selected row and its index when a menu row is pressed. */ onSelect?: (item: DropdownItem, index: number) => void; /** E2E hook forwarded to the root element. */ testID?: string; /** Outer layout composition only (placement within a parent), never a restyle hook. */ style?: LayoutStyle; } export declare function alignEndOf(p: Pick): boolean; /** Build an AvatarMenu from the same platform skin family as Avatar and AvatarGroup. */ export declare function createAvatarMenu(skin: AvatarMenuSkin, Dropdown: (props: DropdownProps) => ReactElement, AccountDropdown?: (props: DropdownProps) => ReactElement): (props: AvatarMenuProps) => import("react").JSX.Element; //# sourceMappingURL=avatar-menu.shared.d.ts.map