import { Nullable } from '../../../types/general';
export declare type FormatTrigger = 'blur' | 'change' | 'input' | 'init';
export declare type FormatTarget = 'component' | 'native-input';
export declare type InputStatus = {
  isBlurred?: boolean;
  caretPosition?: Nullable<number>;
};
/**
 * String format strategy abstract class
 */
export declare abstract class StringFormatStrategy {
  protected overrideValue: boolean;
  /**
   * Check if the {@link format} should be applied
   *
   * @param {FormatTrigger} triggeredBy - The trigger of the format
   * @param {FormatTarget} target - The target of the format
   * @param {InputStatus} inputStatus - The status of the input
   * @returns {boolean} - Whether the format should be applied
   */
  canFormat(triggeredBy: FormatTrigger, target: FormatTarget, inputStatus?: InputStatus): boolean;
  /**
   * Calculates the new caret position in a formatted input string if needed.
   *
   * @param {string} input - The input string
   * @param {number} caretPosition - The current position of caret
   * @returns {Nullable<number>} The new position of caret
   */
  calculateCaretPosition?(input: string, caretPosition: Nullable<number>): Nullable<number>;
  /**
   * Determines whether a component value should be overridden based on the mask configuration.
   *
   * @returns {boolean} - Whether the component value should be overridden.
   */
  protected shouldOverrideComponentValueAfterBlur(): boolean;
  /**
   * Determines whether the format should be triggered at init.
   *
   * @returns {boolean} - Whether the format should be triggered at init.
   */
  protected shouldTriggerAtInit(): boolean;
  /**
   * Format the input string
   *
   * @param {string} input - The input string
   * @param {InputStatus} inputStatus - The timing status of the format
   */
  abstract format(input: string, inputStatus?: InputStatus): string;
}
