export declare enum TouchDirection {
  RIGHT = "TOUCH_DIR_RIGHT",
  LEFT = "TOUCH_DIR_LEFT",
  UP = "TOUCH_DIR_UP",
  DOWN = "TOUCH_DIR_DOWN"
}
export declare type TouchListenerInitParams = {
  touchable: HTMLElement;
  onTouchStart?: (startX: number, startY: number) => void;
  onTouchMove?: (direction: TouchDirection, distance: number) => void;
  onTouchEnd?: (direction: TouchDirection) => void;
};
/**
 * The TouchListener class is a class that listens for touch events on a touchable element
 * and calls a callback function when a touch event occurs
 *
 * @property {TouchListenerInitParams} TouchListenerInitParams params for create touch listener
 * @property {{ x: number; y: number }} touchStartState state object to record start touch coordinate
 */
export declare class TouchListener {
  private touchableParams;
  private touchStartState;
  private touchStart;
  private touchMove;
  private touchEnd;
  /**
   * Create a new instance of the TouchListener class
   *
   * @param {TouchListenerInitParams} params - TouchListenerInitParams
   */
  private constructor();
  /**
   * It creates a new instance of the TouchListener class
   *
   * @param {TouchListenerInitParams} params - TouchListenerInitParams
   * @returns {TouchListener} A new instance of the TouchListener class.
   */
  static init(params: TouchListenerInitParams): TouchListener;
  /**
   * Given the start and end coordinates of a touch event, return the direction and distance of the touch
   *
   * @param {number} startX - The x coordinate of the touch start event.
   * @param {number} startY - The y-coordinate of the touch start event.
   * @param {number} endX - The x coordinate of the touch end event.
   * @param {number} endY - the y coordinate of the touch event.
   * @returns {TouchDirectionAndDistanceType} The direction and distance of the touch.
   */
  private static getTouchDirectionAndDistance;
  /**
   * Get the coordinates of a touch event
   *
   * @param {TouchEvent} event - The event object that was passed to the handler.
   * @returns {TouchEventCoordinatesType} The coordinates of the touch event.
   */
  private static getTouchEventCoordinates;
  /**
   * It removes the touchable events from the touchable.
   */
  destroy(): void;
  /**
   * Attach the touchstart, touchmove, and touchend listeners to the touchable element.
   * The bind() method returns a copy of the given function with the provided this value and initial arguments,
   * which causes remove event listeners to fail.
   */
  private attachListeners;
  /**
   * It prevents the default behavior of the touch event and stores the coordinates of the touch event in the
   * touchStartState variable.
   *
   * @param {TouchEvent} event - The event object that was triggered.
   */
  private onTouchStart;
  /**
   * It prevents the default behavior of the event, and then it gets the coordinates of the touch event, and then it gets
   * the direction and distance of the touch event.
   *
   * @param {TouchEvent} event - The native event object.
   */
  private onTouchMove;
  /**
   * It calls the onTouchEnd function of the touchableParams object.
   *
   * @param {TouchEvent} event - The event object that was passed to the onTouchStart or onTouchEnd callback.
   */
  private onTouchEnd;
  /**
   * Reset the start state
   */
  private resetStartState;
}
