import { type Formatter } from './business/format'; export type OptionDisplayTone = 'success' | 'warning' | 'danger' | 'info' | 'neutral'; /** One resolved right-aligned metric (`display.trailing[]`). */ export interface OptionTrailingItem { key: string; label?: string; value: unknown; format?: 'money' | 'number' | 'integer' | 'percent' | 'date' | 'relative_date' | 'text' | string; currency?: string; tone?: OptionDisplayTone | string; /** Replaces the formatted value («Agotado»). */ text?: string; } export interface OptionBadgeItem { text: string; tone?: OptionDisplayTone | string; } /** The `display` object of an option (kernel `OptionDisplayValue`). */ export interface OptionDisplayData { title?: string; subtitle?: string; image?: string | null; trailing?: OptionTrailingItem[]; badges?: OptionBadgeItem[]; tone?: OptionDisplayTone | string; /** Attenuated row (still selectable). */ dimmed?: boolean; /** Not selectable. */ blocked?: boolean; } /** Reads a well-formed display off any option-like value (null when absent). */ export declare function getOptionDisplay(option: unknown): OptionDisplayData | null; type BadgeVariant = 'success' | 'warning' | 'danger' | 'info' | 'muted'; export declare const toneVariant: (tone?: string) => BadgeVariant; /** «hace 3 días» / «en 2 semanas» in the formatter's locale. */ export declare function formatRelativeDate(input: unknown, locale: string, now?: Date): string; /** Formats one trailing value per its declared format (org currency for money). */ export declare function formatTrailingValue(item: OptionTrailingItem, fmt: Formatter, now?: Date): string; export interface OptionDisplayRowProps { display: OptionDisplayData; /** Fallback title (the option label) when the display has none. */ label?: string; /** Keyboard / pointer highlight (for the title color). */ active?: boolean; selected?: boolean; /** Org currency override for money metrics without their own currency. */ currency?: string; /** Avatar size in px. Default 32. */ avatarSize?: number; } /** * The option row: avatar 32px · title (≤2 lines) + badges · muted subtitle · * metrics aligned right. `dimmed` attenuates the content, never the hover. */ export declare function OptionDisplayRow({ display, label, active, selected, currency, avatarSize }: OptionDisplayRowProps): import("react").JSX.Element; /** * Compact summary for a picker's trigger: small avatar, title and the most * relevant metric (the toned one, else the first). */ export declare function OptionDisplayValue({ display, label, currency }: { display: OptionDisplayData; label?: string; currency?: string; }): import("react").JSX.Element; /** Whether any of the options carries a display (switches a picker to rich rows). */ export declare const hasOptionDisplays: (options: readonly unknown[]) => boolean; export {}; //# sourceMappingURL=option-display.d.ts.map