/**
 * @file Avatar.tsx
 * @input Uses React, HTMLAttributes, ReactNode, useState; useTooltip
 *   (Tooltip hook) for the optional name-on-hover tooltip; useTranslator (i18n)
 * @output Exports Avatar component, AvatarProps, AvatarSize types
 * @position Core implementation; consumed by index.ts
 *
 * SYNC: When modified, update these files to stay in sync:
 * - /packages/core/src/Avatar/Avatar.doc.mjs (props table, features, implementation notes)
 * - /packages/core/src/Avatar/index.ts (exports if types change)
 * - /apps/storybook/stories/Avatar.stories.tsx (storybook stories)
 * - /packages/cli/assets/templates/blocks/components/Avatar/ (showcase blocks)
 *
 * Last synced props: alt, fallbackSrc, name, size, src, status, href, as, target, rel, onClick
 */
import { type ReactNode } from 'react';
import type { BaseProps } from '../BaseProps';
import type { LinkComponentType } from '../Link/types';
/**
 * Named size options.
 *
 * Avatar uses the same abbreviated scale as Icon (`xsm`/`sm`/`md`/`lg`/`xl`),
 * but the values are larger because avatars align with media rather than
 * glyphs. The tiers follow the standard avatar size scale.
 */
type AvatarNamedSize = 'xsm' | 'sm' | 'md' | 'lg' | 'xl';
/**
 * Numeric size options (in pixels)
 */
type AvatarNumericSize = 16 | 20 | 24 | 32 | 36 | 40 | 48 | 60 | 64 | 72 | 96 | 128 | 144 | 180;
/**
 * Avatar size - can be a named size or a specific pixel value
 */
export type AvatarSize = AvatarNamedSize | AvatarNumericSize;
/**
 * Resolves named sizes to their numeric pixel values
 */
export declare function resolveSize(size: AvatarSize): number;
export interface AvatarProps extends BaseProps<HTMLDivElement> {
    /** Ref forwarded to the root element */
    ref?: React.Ref<HTMLDivElement>;
    /**
     * The alt text shown on hover and made accessible to screen readers.
     * Falls back to `name` if not provided.
     */
    alt?: string;
    /**
     * testid for tests.
     */
    'data-testid'?: string;
    /**
     * Fallback image source when primary `src` fails to load.
     * If this also fails, shows initials derived from `name`.
     */
    fallbackSrc?: string;
    /**
     * The user's name. Used for:
     * - Generating initials when no image is available
     * - Default alt text if `alt` is not provided
     */
    name?: string;
    /**
     * The size of the avatar. A named size (`xsm` 20px, `sm` 24px, `md` 36px,
     * `lg` 48px, `xl` 128px) or a specific pixel value.
     * @default 'md'
     */
    size?: AvatarSize;
    /**
     * The primary image source for the avatar.
     */
    src?: string;
    /**
     * Content displayed in the corner of the avatar.
     * Typically used for status indicators or badges.
     *
     * When the element carries a string `label` prop (as `AvatarStatusDot`
     * does), the label is composed into the avatar's accessible name
     * (e.g. "Jane Doe, Online") so assistive tech can reach the status —
     * the `role="img"` root prunes descendant semantics (WCAG 4.1.2).
     */
    status?: ReactNode;
    /**
     * Tooltip shown on hover (and keyboard focus).
     * - omitted / `true`: show the avatar's `name`
     * - a string: show that text instead
     * - `false`: no tooltip
     *
     * The avatar owns this tooltip. It is NOT auto-disabled when wrapped in your
     * own Tooltip/HoverCard — set `tooltip={false}` if you provide your own
     * overlay. No tooltip is shown if `tooltip` is `true`/omitted and there is
     * no (non-whitespace) `name`.
     * @default true
     */
    tooltip?: string | boolean;
    /**
     * When provided, the avatar becomes an interactive link (`<a>` or custom
     * link component) pointing at `href`. Follows the same element-swap rules as
     * Button: `href` renders a link, otherwise `onClick` renders a
     * `<button type="button">`, otherwise the avatar stays a static (non-focusable)
     * element. An interactive avatar requires a meaningful accessible name via
     * `alt` or `name`.
     */
    href?: string;
    /**
     * Custom link component to use when `href` is provided. Overrides the
     * provider-level default set by LinkProvider. Useful for Next.js `<Link>` or
     * other router-aware components. Only applies when `href` is provided.
     */
    as?: LinkComponentType;
    /**
     * HTML target attribute for the link. Only applies when `href` is provided.
     */
    target?: string;
    /**
     * HTML rel attribute for the link. Only applies when `href` is provided.
     */
    rel?: string;
    /**
     * Click handler. When provided without `href`, renders the avatar as a
     * focusable `<button type="button">`. An interactive avatar requires a
     * meaningful accessible name via `alt` or `name`.
     */
    onClick?: React.MouseEventHandler<HTMLElement>;
}
/**
 * Avatar component for displaying user profile pictures.
 *
 * Displays an image when available, falling back to initials derived from
 * the name prop, or a generic person icon if neither is provided.
 *
 * @example
 * ```
 * <Avatar src="/user.jpg" name="John Doe" />
 * <Avatar name="Jane Smith" size="xl" />
 * <Avatar src="/user.jpg" status={<OnlineIndicator />} />
 * <Avatar name="jsmith" tooltip="Jane Smith, Staff Engineer" />
 * <Avatar name="Jane" tooltip={false} />
 * <Avatar src="/user.jpg" name="John Doe" href="/users/john" />
 * <Avatar src="/user.jpg" name="John Doe" onClick={() => openProfile()} />
 * ```
 */
export declare function Avatar({ alt, 'data-testid': testId, fallbackSrc, name, size, src, status, tooltip, href, as, target, rel, onClick, xstyle, className, style, ref, ...props }: AvatarProps): import("react").JSX.Element;
export declare namespace Avatar {
    var displayName: string;
}
export {};
//# sourceMappingURL=Avatar.d.ts.map