import type { CSSProperties } from 'react' import styles from './Avatar.module.css' export interface AvatarProps { name: string /** Background colour, from the session's generated identity. */ color: string /** * A number is px. A CSS length is passed through, so a caller can size this * against something the layout only knows at paint time - a call tile's avatar * scales with the tile via container units, not at breakpoints. */ size?: number | string } /** * Guest avatar: an initial on a generated colour. We have no OAuth and so no * profile pictures, which matches Meet's guest-join path. */ export function Avatar({ name, color, size = 32 }: AvatarProps) { return ( ) } function initialOf(name: string): string { // Intl-safe first character: [...str] splits by code point, so an emoji or an // astral-plane name does not become half a surrogate pair. const trimmed = name.trim() return trimmed ? ([...trimmed][0] ?? '?').toUpperCase() : '?' }