// arqamWordsToNumbers: a sub-library of arqamAR, which the module imports: Arabic number words back to numbers. Values are strings (no rounding).
// @author : Mohsen Alyafei
export interface WordsToNumbersOptions {
  /** "auto" (default): the reading order that reads the text as fewer numbers; "large" or "small" to force one */
  order?: "auto" | "large" | "small";
  /** "short" (default): مليار = بليون = 10^9; "long": بليون = 10^12 */
  scale?: "short" | "long";
  /** "on" writes the digits as Arabic-Eastern numbers ٠١٢٣ */
  arabicNumbers?: "on" | "off";
  /** "on" reads صفر as 0 */
  zero?: "on" | "off";
  /** "on" also reads alone the number words that are ordinary words (مياه، متين، وحده …) */
  ambiguous?: "on" | "off";
  /** "words" (default) keeps the currency words; "code" writes the amount as «1250.50 QAR»; "off" reads no currency */
  currency?: "words" | "code" | "off";
  /** "on" reads ordinals (الحادي عشر -> 11); off by default */
  ordinals?: "on" | "off";
}
export interface FoundNumber {
  start: number; end: number; text: string;
  /** "1250.5", "-25", "5 1/3" (a mixed number when the fraction has no exact decimal); null for «بضعة …» and «نيّف …» (see min, max) */
  value: string | null;
  /** An approximate quantity: "about" (قرابة، نحو، زهاء، حوالي), "over", "under", "atLeast", "atMost", "few" (بضع), "plus" (نيّف) */
  approx?: "about" | "over" | "under" | "atLeast" | "atMost" | "few" | "plus";
  /** The leading words (قرابة) and where they start; the number itself keeps start and end */
  approxText?: string; approxStart?: number;
  /** The range of «بضعة آلاف» (3000, 9000) or «نيّف وعشرون» (21, 29) */
  min?: string; max?: string;
  negative?: boolean; percent?: boolean; ordinal?: boolean;
  /** the currency code, or null when the name fits several currencies (ريال) */
  currency?: string | null; noun?: string; places?: number;
}
export interface VerifyResult {
  ok: boolean;
  reason: "match" | "different" | "currency" | "none" | "several";
  read: string | null; expected: string; currency: string | null;
}
export interface VerifyOptions extends WordsToNumbersOptions { code?: string }
declare function arqamWordsToNumbers(text: string, options?: WordsToNumbersOptions): string;
declare namespace arqamWordsToNumbers {
  const version: string;
  function find(text: string, options?: WordsToNumbersOptions): FoundNumber[];
  function value(text: string, options?: WordsToNumbersOptions): string | null;
  function verify(words: string, number: string | number | bigint, options?: VerifyOptions): VerifyResult;
  function removeTashkeel(text: string, options?: {tatweel?: "on" | "off"; hamza?: "on" | "off"}): string;
  function removeTashkeel(text: string[], options?: {tatweel?: "on" | "off"; hamza?: "on" | "off"}): string[];
  /** A date toDate() wrote, back to "YYYY-MM-DD" ("YYYY-MM-DD هـ" for Hijri), or null */
  function date(text: string): string | null;
  /** A time toTime() wrote, back to "HH:MM" (24-hour), or null */
  function time(text: string): string | null;
}
export default arqamWordsToNumbers;
export const version: string;
export function find(text: string, options?: WordsToNumbersOptions): FoundNumber[];
export function value(text: string, options?: WordsToNumbersOptions): string | null;
export function verify(words: string, number: string | number | bigint, options?: VerifyOptions): VerifyResult;
export function wordsToNumbers(text: string, options?: WordsToNumbersOptions): string;
export function removeTashkeel(text: string, options?: {tatweel?: "on" | "off"; hamza?: "on" | "off"}): string;
export function removeTashkeel(text: string[], options?: {tatweel?: "on" | "off"; hamza?: "on" | "off"}): string[];
/** A date toDate() wrote, back to "YYYY-MM-DD" ("YYYY-MM-DD هـ" for Hijri), or null */
export function date(text: string): string | null;
/** A time toTime() wrote, back to "HH:MM" (24-hour), or null */
export function time(text: string): string | null;
