import { Nullable } from '../../../types/general';
import { StringFormatStrategy } from './string-format-strategy.abstract';
export declare type NumberMaskConfig = {
  /**
   * 0 - will only allow integer
   */
  precision?: number;
  /**
   * Whether allow negative. Default is true
   */
  allowNegative?: boolean;
  /**
   * Format as thousand comma
   */
  thousandComma?: boolean;
};
/**
 * A class for formatting number with the given mask format
 */
export declare class NumberMaskStrategy extends StringFormatStrategy {
  protected readonly maskConfig: NumberMaskConfig;
  protected mask: RegExp;
  /**
   * It creates a new instance of the Mask class.
   *
   * @param {NumberMaskConfig} maskConfig - MaskConfig
   * @param {boolean} overrideValue - Whether to override the value after blur, default is false
   */
  constructor(maskConfig?: NumberMaskConfig, overrideValue?: boolean);
  /**
   * Given a number string, it replaces the mask with the matched input value
   *
   * @param {string} input - input number
   * @returns {string} The formatted number string.
   */
  format(input: string): string;
  /**
   * Get the position of caret
   *
   * @param {string} input - input number
   * @param {number} caretPosition - The current caret position
   * @returns {Nullable<number>} The new position of caret
   */
  calculateCaretPosition(input: string, caretPosition: Nullable<number>): Nullable<number>;
  /**
   * if allow negative, will skip '-', e.g. when input '-' -> '-1.2'
   * if precision is not null, then user can fill input with decimal places, e.g. when input '1.' -> '1.2'
   *
   * @param {string} input - input number
   * @returns {boolean} need skip if return true, otherwise false
   */
  protected skipFormat: (input: string) => boolean;
  /**
   * Whether the input string need delete the latest char
   *
   * @param {string} value - the input value
   * @returns {boolean} return true if the value need mask format. otherwise false
   */
  protected inputNeedFormat(value: string): boolean;
  /**
   * Remove zero of beginning, example:
   *    00012 -> 12
   *    000.12 -> 0.12
   *    00123,456 -> 123,456
   *    .12 -> 0.12
   *
   * @param {string} input - the input value
   * @returns {string} - redressed Number
   */
  protected redressAbnormalNumber(input: string): string;
  /**
   * Get the number RegExp
   *
   * @returns {string} - The number regExp
   */
  private getRegExp;
}
