/** Intl.ListFormat conjunction/disjunction/unit type */ export type ListFormatType = 'conjunction' | 'disjunction' | 'unit'; /** Intl.ListFormat style: long, short, or narrow */ export type ListFormatStyle = 'long' | 'short' | 'narrow'; /** Options for useListFormat hook */ export interface IUseListFormatOptions { locale?: string; type?: ListFormatType; style?: ListFormatStyle; separator?: string; /** If true, format as if there's one more item (avoids "and" before overflow counter) */ hasOverflow?: boolean; } /** A single part of a formatted list (element or separator) */ export interface IListPart { type: 'element' | 'literal'; value: string; index: number; } /** * Hook for locale-aware list formatting using Intl.ListFormat. * * Provides parts that can be rendered individually with animations. * Uses the browser's Intl.ListFormat API for proper locale handling. * * @param items - Array of strings to format * @param options - Locale, type, style, separator override, overflow flag * @returns Array of list parts (elements and literals) * * @example * ```tsx * // Automatic locale detection * const parts = useListFormat(['Apple', 'Banana', 'Cherry']); * // en: [{ type: 'element', value: 'Apple' }, { type: 'literal', value: ', ' }, ...] * * // Spanish * const parts = useListFormat(['Apple', 'Banana'], { locale: 'es' }); * * // Disjunction ("or") * const parts = useListFormat(['A', 'B', 'C'], { type: 'disjunction' }); * // en: "A, B, or C" * * // Manual separator override * const parts = useListFormat(['A', 'B', 'C'], { separator: ' | ' }); * // "A | B | C" * ``` */ export declare function useListFormat(items: string[], options?: IUseListFormatOptions): IListPart[]; //# sourceMappingURL=UseListFormat.d.ts.map