import { LucideIcon } from 'lucide-react'; /** The identity rendered by {@link UserProfile}. */ export interface IUserProfile { /** Display name. Shown on the trigger and in the dropdown header. */ name: string; /** Secondary line, e.g. job title. Omit to hide it. */ role?: string; /** Shown in the dropdown header only. */ email?: string; /** Image URL or data URL. Falls back to a generic user icon. */ avatarUrl?: string; } /** An action in the profile dropdown. */ export interface IUserProfileAction { /** Stable identifier. Used as the React key. */ id: string; /** Label shown for the action. */ label: string; /** `lucide-react` icon rendered at 12px. */ icon?: LucideIcon; /** Runs on click. The dropdown closes afterwards. */ onSelect: () => void; /** Render in the destructive colour, for sign-out and similar. */ destructive?: boolean; /** Draw a separator above this action. */ divider?: boolean; } export interface UserProfileProps { /** The identity to display. */ profile: IUserProfile; /** * Actions listed in the dropdown. Empty by default — the component prescribes * no menu, since "Sign Out" and "Account Settings" mean different things in * every app. */ actions?: IUserProfileAction[]; /** * Called with the new name and role when the inline editor is saved. * Omit it to hide the edit affordance entirely. */ onProfileChange?: (profile: Pick) => void; /** * Called with a file the user picked for their avatar. Read it and update * `profile.avatarUrl` yourself — the component neither reads files nor holds * the result. Omit it to hide the upload affordance. */ onAvatarChange?: (file: File) => void; /** * Bypass the dropdown entirely and just report the click. Useful when the * profile should open a full settings tab instead of a menu. */ onClick?: () => void; /** Show the name and role beside the avatar. Defaults to `true`. */ showName?: boolean; /** Extra classes merged onto the trigger button. */ className?: string; } /** * An avatar and identity widget with a dropdown menu, sized for a menu bar's * right slot. * * Fully controlled — it owns only its open/editing UI state. The identity comes * in as `profile`, edits go out through `onProfileChange`, and the menu is * whatever you pass as `actions`. It reads no store and prescribes no menu * items, so it works the same against a session hook, an auth provider, or * static props. * * @example * ```tsx * save(next)} * actions={[ * { id: 'settings', label: 'Account Settings', icon: Settings, onSelect: openSettings }, * { id: 'out', label: 'Sign Out', icon: LogOut, onSelect: signOut, destructive: true, divider: true }, * ]} * /> * ``` */ export declare const UserProfile: ({ profile, actions, onProfileChange, onAvatarChange, onClick, showName, className, }: UserProfileProps) => import("react/jsx-runtime").JSX.Element;