
//#region src/i18n/createFormatter.d.ts
/**
 * A value acceptable to the date/time formatters. Named `FormatDateInput` (not
 * `DateInput`) to avoid clashing with the exported `DateInput` DatePicker field.
 */
type FormatDateInput = Date | number | string;
interface RelativeTimeOptions {
  /** Reference point the value is compared against. Defaults to `Date.now()`. */
  now?: FormatDateInput;
  /** Passed to `Intl.RelativeTimeFormat`. Defaults to `'auto'` ("yesterday"). */
  numeric?: Intl.RelativeTimeFormatNumeric;
  /** Passed to `Intl.RelativeTimeFormat`. Defaults to `'long'`. */
  style?: Intl.RelativeTimeFormatStyle;
}
interface CurrencyOptions extends Intl.NumberFormatOptions {
  /** ISO 4217 currency code. Defaults to `'USD'`. */
  currency?: string;
}
interface BytesOptions {
  /** How the unit label is displayed. Defaults to `'short'` ("MB"). */
  unitDisplay?: Intl.NumberFormatOptions['unitDisplay'];
  /** Max fraction digits. Defaults to `1`. */
  maximumFractionDigits?: number;
  /** Min fraction digits. Defaults to `0`. */
  minimumFractionDigits?: number;
}
/** The bundle of locale-bound formatting helpers. */
interface Formatter {
  /** The BCP-47 locale every helper below formats for. */
  locale: string;
  /** Date only, defaults to `{ dateStyle: 'medium' }` ("Jan 15, 2024"). */
  formatDate: (value: FormatDateInput, options?: Intl.DateTimeFormatOptions) => string;
  /** Time only, defaults to `{ timeStyle: 'short' }` ("2:30 PM"). */
  formatTime: (value: FormatDateInput, options?: Intl.DateTimeFormatOptions) => string;
  /** Date + time, defaults to `{ dateStyle: 'medium', timeStyle: 'short' }`. */
  formatDateTime: (value: FormatDateInput, options?: Intl.DateTimeFormatOptions) => string;
  /** Relative time via `Intl.RelativeTimeFormat` ("5 minutes ago"). */
  formatRelativeTime: (value: FormatDateInput, options?: RelativeTimeOptions) => string;
  /** A number via `Intl.NumberFormat`. */
  formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;
  /** A currency amount, defaults to USD. */
  formatCurrency: (value: number, options?: CurrencyOptions) => string;
  /** A percentage. Input is a fraction: `0.5` → "50%". */
  formatPercent: (value: number, options?: Intl.NumberFormatOptions) => string;
  /** A byte count with a localized, auto-scaled unit ("1.5 MB"). Decimal (1000-based). */
  formatBytes: (value: number, options?: BytesOptions) => string;
  /** A list via `Intl.ListFormat` ("A, B, and C"). */
  formatList: (items: Iterable<string>, options?: Intl.ListFormatOptions) => string;
}
/**
 * Builds a bundle of formatting helpers bound to `locale`. Used by both
 * `useFormatter()` (locale from React Aria context) and the pure top-level
 * helpers (locale from the module mirror). All `Intl.*` instances are memoized.
 */
declare function createFormatter(locale: string): Formatter;
//#endregion
export { BytesOptions, CurrencyOptions, FormatDateInput, Formatter, RelativeTimeOptions, createFormatter };
//# sourceMappingURL=createFormatter.d.ts.map