import type { HTMLAttributes, ReactNode } from 'react';
import type { SxProp } from '../Layout/sx.cjs';
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg';
export type AvatarStatus = 'online' | 'busy' | 'offline';
export interface AvatarProps extends HTMLAttributes {
size?: AvatarSize;
status?: AvatarStatus;
src?: string;
alt?: string;
/**
* Full name. When there is no `src` (or the image fails to load) and no
* `children`, its initials are shown.
*/
name?: string;
/**
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
* merges into inline style; responsive sx injects a scoped class.
*/
sx?: SxProp;
children?: ReactNode;
}
export interface AvatarGroupProps extends HTMLAttributes {
/** Avatars shown before collapsing the rest into "+N". Default 5. */
max?: number;
/** Real total when the children are only a page of a bigger set. Defaults to the child count. */
total?: number;
/** Size applied to the "+N" overflow avatar. Match your avatars. */
size?: AvatarSize;
/** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */
sx?: SxProp;
children: ReactNode;
}
export interface AvatarStackProps extends HTMLAttributes {
/** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */
sx?: SxProp;
children: ReactNode;
}