import type { ReactElement } from "react"; import { type ColorTokens, type StyleProp, type ViewStyle, type TextStyle } 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. * Everything platform-neutral (the capsule's flex row, the 9999 capsule radius, * the identity column, the chevron rotation, and the 11/14 secondary line's size) * lives in this file; a skin owns only the numbers that shift per OS. */ export interface AvatarMenuSkin extends AvatarSkin { /** Capsule metrics: height, gap, start/end padding, radius, hairline width. */ menuPill: ViewStyle; /** Capsule fill and border color, closed and open, from the theme tokens. */ menuPillFill: (t: ColorTokens, open: boolean) => ViewStyle; /** The name line's type (size / line-height / weight / tracking). */ menuPillName: TextStyle; /** The secondary (email) line's type: 11/14 everywhere, tracking per OS. */ menuPillSecondary: TextStyle; /** Trailing chevron glyph size, in px. */ menuChevronSize: number; } export interface AvatarMenuProps { /** 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; /** 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?: StyleProp; } /** Build an AvatarMenu from the same platform skin family as Avatar and AvatarGroup. */ export declare function createAvatarMenu(skin: AvatarMenuSkin, Dropdown: (props: DropdownProps) => ReactElement): (props: AvatarMenuProps) => import("react").JSX.Element; //# sourceMappingURL=avatar-menu.shared.d.ts.map