import * as react_jsx_runtime from 'react/jsx-runtime';
import { U as User, A as AccountSwitcherConfig, a as AccountSwitcherContextValue } from '../types-CXDDCs0b.mjs';
import React$1 from 'react';
interface AccountAvatarProps {
/** Avatar diameter in pixels (default: 40) */
size?: number;
/** Additional CSS classes */
className?: string;
/** Custom inline styles */
style?: React.CSSProperties;
/** ID of element to toggle visibility on click (e.g., IFRAME container) */
targetId?: string;
/** Custom click handler */
onClick?: () => void;
/** Callback when avatar is clicked with current user data */
onAvatarClick?: (user: User | null) => void;
}
/**
* AccountAvatar Component
*
* A compact, clickable avatar component for NAV bars that displays the current user's avatar
* and synchronizes with the AccountSwitcher session.
*
* Features:
* - Displays user avatar (image or initials) when logged in
* - Shows generic profile icon when logged out
* - Automatically syncs with session changes via AccountSwitcherProvider
* - Toggles target element visibility (typically IFRAME container)
* - Outside click and ESC key support for closing popup
* - Smooth hover and active animations
*
* @example
* ```tsx
* // Basic usage
*
*
* // With IFRAME toggle
*
*
* // In NAV with dropdown
*
*
*
*
* ```
*/
declare function AccountAvatar({ size, className, style, targetId, onClick, onAvatarClick, }: AccountAvatarProps): react_jsx_runtime.JSX.Element;
interface AccountSwitcherProps {
className?: string;
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
width?: number;
height?: number;
/** Callback when iframe height changes (auto-resize) */
onHeightChange?: (height: number) => void;
}
/**
* AccountSwitcher iframe component
* Displays the account switcher widget in an iframe
*/
declare function AccountSwitcher({ className, width, height: initialHeight, onHeightChange, }: AccountSwitcherProps): react_jsx_runtime.JSX.Element;
interface AccountSwitcherProviderProps extends AccountSwitcherConfig {
children: React$1.ReactNode;
}
/**
* Provider component for account switcher functionality
* Wraps your app to provide session state and switcher methods
*/
declare function AccountSwitcherProvider({ children, backendUrl, authServiceUrl, serviceApiKey, onSessionChange, onAccountChange, onError, debug, dialogs, onConfirmRequest, onPromptRequest, onAlertRequest, autoResize, minHeight, maxHeight, onResize, onNavigate, onNavigateToAddAccount, onNavigateToManageAccount, onNavigateToAvatarUpdate, }: AccountSwitcherProviderProps): react_jsx_runtime.JSX.Element;
/**
* Hook to access the account switcher context
* @throws Error if used outside of AccountSwitcherProvider
*/
declare function useAccountSwitcherContext(): AccountSwitcherContextValue;
interface HandoffArrivalToastProps {
/** Auto-dismiss after this many ms. Default 5000. Pass 0 to disable. */
autoDismissMs?: number;
}
/**
* Drop-in arrival banner — pair with the F2 → F5 handoff flow. Renders nothing
* when there's no `?_toast=` to show.
*/
declare function HandoffArrivalToast({ autoDismissMs }: HandoffArrivalToastProps): react_jsx_runtime.JSX.Element | null;
export { AccountAvatar, type AccountAvatarProps, AccountSwitcher, type AccountSwitcherProps, AccountSwitcherProvider, type AccountSwitcherProviderProps, HandoffArrivalToast, type HandoffArrivalToastProps, useAccountSwitcherContext };