import type { Signalish } from '@nano_kit/store'; import type { AnyFormat, Format, FormatInput, FormatOutput } from './types.js'; export type ChooseFormats> = { [K in keyof F]: (value: FormatInput | null) => FormatOutput; }; export type ChooseArg = [V] extends [Record] ? { [K in keyof V]: Signalish; } : Signalish; /** * Creates a callable message that renders a value with the formats a function chooses. * @param formats - Formats keyed by name, like `datetime` or `relativetime`. * @param fn - Function that receives the formats bound to the active locale, the value of the call read from a signal or an accessor, and the active locale, and returns what the message renders. Each value of a plain object passed instead is read the same way. * @returns Format that returns the callable message. */ export declare function choose, V = FormatInput | null, O = unknown>(formats: F, fn: (formats: ChooseFormats, value: V, locale: string) => O): Format) => O>; //# sourceMappingURL=choose.d.ts.map