/** * Account-element icon registry. * * Maps each selectable account icon id to its icon component. The ids * and order mirror the PHP source of truth (Elements::account_icon_choices() / * account_icon_shapes()), which renders matching inline SVG on the front end so * the picker is WYSIWYG. Labels come from the schema (`accountIcons`). */ import { User, UserCircle, UserRound, Contact, type LucideIcon, } from '../../icons'; export const ACCOUNT_ICONS: Record< string, LucideIcon > = { user: User, 'user-circle': UserCircle, 'user-round': UserRound, contact: Contact, }; export const DEFAULT_ACCOUNT_ICON = 'user'; /** * The lucide component for an account icon id, falling back to the user icon. * @param id Account icon id. */ export const accountIconFor = ( id: string ): LucideIcon => ACCOUNT_ICONS[ id ] ?? ACCOUNT_ICONS[ DEFAULT_ACCOUNT_ICON ];