import type { Base } from '@studiometa/js-toolkit'; export type Modifiers = 'prevent' | 'stop' | 'once' | 'passive' | 'capture' | 'debounce'; export declare class ActionEvent { static modifierSeparator: string; static targetSeparator: string; static effectSeparator: string; /** * Timer for debouncing event handling. */ private debounceTimer?; /** * The Action instance. */ action: T; /** * The event to listen to. */ event: string; /** * The modifiers to apply to the event. */ modifiers: Modifiers[]; /** * The debounce delay in milliseconds. */ debounceDelay: number; /** * Target definition. * Ex: `Target Target(.selector)`. */ targetDefinition: string; /** * The content of the effect callback function. */ effectDefinition: string; /** * Class constructor. * @param {T} action The parent Action instance. * @param {string} eventDefinition The event with its modifiers: `click.prevent.stop` * @param {string} effectDefinition The target and effect definition: `Target(.selector)->target.$destroy()` */ constructor(action: T, eventDefinition: string, effectDefinition: string); /** * Get the generated function for the defined effect. */ get effect(): Function; /** * Get the targets object for the defined targets string. */ get targets(): Record>[]; /** * Get instances mounted on the action element. * @internal */ get instances(): Map>; /** * Handle the defined event and trigger the effect for each defined target. */ handleEvent(event: Event): void; /** * Execute the effect for all targets. */ executeEffect(targets: Array>, effect: Function, event: Event): void; /** * Bind the defined event to the given Action instance root element. */ attachEvent(): void; /** * Unbind the event from the given Action instance root element. */ detachEvent(): void; }