import CanvasEventNamesType from '../types/CanvasEventNamesType.cjs';
import { EventIdType } from '../types/EventIdType.cjs';
import 'pixi.js';

/**
 * CanvasEvent is a class that is used to create a pixi event, and connect it to a canvas element, with on().
 * This class should be extended and the fn method should be overridden.
 * You must use the {@link eventDecorator} to register the event in the game.
 * @example
 * ```typescript
 * \@eventDecorator() // this is equivalent to eventDecorator("EventTest")
 * export class EventTest extends CanvasEvent<Sprite> {
 *     override fn(event: CanvasEventNamesType, sprite: Sprite): void {
 *         if (event === 'pointerdown') {
 *             sprite.scale.x *= 1.25;
 *             sprite.scale.y *= 1.25;
 *         }
 *     }
 * }
 * ```
 */
declare class CanvasEvent<C> {
    constructor();
    fn(_event: CanvasEventNamesType, _element: C): void;
    /**
     * Get the id of the event. This variable is used in the system to get the event by id, {@link getEventInstanceById}
     */
    id: EventIdType;
}

export { CanvasEvent as default };
