import { EventReactions, EventGuards, Guard, TemplateState, TemplateStateMachine } from "../../being/interfaces"; import { TouchContext } from "./touch-input-context"; export type TouchStates = "IDLE" | "PENDING" | "IN_PROGRESS"; /** * @description The touch points. * * @category Input State Machine */ export type TouchPoints = { ident: number; x: number; y: number; }; /** * @description The touch event payload. * * @category Input State Machine */ export type TouchEventPayload = { points: TouchPoints[]; }; /** * @description The touch event mapping. * * @category Input State Machine */ export type TouchEventMapping = { touchstart: TouchEventPayload; touchmove: TouchEventPayload; touchend: TouchEventPayload; }; /** * @description The idle state of the touch input state machine. * * @category Input State Machine */ export declare class IdleState extends TemplateState { private _eventReactions; protected _guards: Guard; protected _eventGuards: Partial>; get eventReactions(): EventReactions; touchstart(context: TouchContext, payload: TouchEventPayload): void; touchend(context: TouchContext, payload: TouchEventPayload): void; } /** * @description The pending state of the touch input state machine. * * @category Input State Machine */ export declare class PendingState extends TemplateState { private _eventReactions; get eventReactions(): EventReactions; touchstart(context: TouchContext, payload: TouchEventPayload): void; touchend(context: TouchContext, payload: TouchEventPayload): void; touchmove(context: TouchContext, payload: TouchEventPayload): void; } /** * @description The in progress state of the touch input state machine. * * @category Input State Machine */ export declare class InProgressState extends TemplateState { private _eventReactions; get eventReactions(): EventReactions; touchmove(context: TouchContext, payload: TouchEventPayload): void; touchend(context: TouchContext, payload: TouchEventPayload): void; } /** * @description The touch input state machine. * * @category Input State Machine */ export type TouchInputStateMachine = TemplateStateMachine; export declare function createTouchInputStateMachine(context: TouchContext): TouchInputStateMachine;