/** * Shared formatters / icon maps / label resolver for the message layout * components. Pure functions only — i18n strings come in via the `roles` * argument; the helper has no runtime dependency on the messages context. */ import type { PlaygroundMessage, PlaygroundMessageLevel, PlaygroundMessageRole } from '../../types/playground.js'; import type { Messages } from '../../messages/types.js'; export type RoleLabels = Messages['playground']['roles']; export declare function formatTimestamp(timestamp: string): string; export declare function formatDuration(ms: number): string; export declare function getLogLevelIcon(level: PlaygroundMessageLevel | undefined): string; export declare function getRoleIcon(role: PlaygroundMessageRole): string; /** * Localised author label. Backend-supplied overrides win: * - user → metadata.userName (display name) * - log → metadata.nodeLabel (human-readable node label) * Anything else returns the role's i18n default. */ export declare function getRoleLabel(message: Pick, roles: RoleLabels): string;