import type { EventFormat, SimulatedEvent } from '../../events/SimulatedEvent'; import type { AlloyComponent } from '../component/ComponentApi'; import type { CompositeSketchDetail } from '../ui/Sketcher'; export type AlloyEventRecord = Record>; export interface AlloyEventHandler { can: EventCanHandler; abort: EventAbortHandler; run: EventRunHandler; } export interface AlloyEventKeyAndHandler { key: string; value: AlloyEventHandler; } type RunOnName = (handler: EventRunHandler) => AlloyEventKeyAndHandler; type RunOnSourceName = (handler: EventRunHandler) => AlloyEventKeyAndHandler; export type EventRunHandler = (component: AlloyComponent, se: SimulatedEvent, ...others: any[]) => void; export type EventAbortHandler = (comp: AlloyComponent, se: SimulatedEvent) => boolean; export type EventCanHandler = (comp: AlloyComponent, se: SimulatedEvent) => boolean; declare const derive: (configs: Array>) => AlloyEventRecord; declare const abort: (name: string, predicate: EventAbortHandler) => AlloyEventKeyAndHandler; declare const can: (name: string, predicate: EventCanHandler) => AlloyEventKeyAndHandler; declare const preventDefault: (name: string) => AlloyEventKeyAndHandler; declare const run: (name: string, handler: EventRunHandler) => AlloyEventKeyAndHandler; declare const runActionExtra: (name: string, action: (t: AlloyComponent, se: SimulatedEvent, u: any) => void, extra: any[]) => AlloyEventKeyAndHandler; declare const redirectToUid: (name: string, uid: string) => AlloyEventKeyAndHandler; declare const redirectToPart: (name: string, detail: CompositeSketchDetail, partName: string) => AlloyEventKeyAndHandler; declare const runWithTarget: (name: string, f: (component: AlloyComponent, target: AlloyComponent, se: SimulatedEvent) => void) => AlloyEventKeyAndHandler; declare const cutter: (name: string) => AlloyEventKeyAndHandler; declare const stopper: (name: string) => AlloyEventKeyAndHandler; declare const runOnSource: (name: string, f: EventRunHandler) => AlloyEventKeyAndHandler; declare const runOnAttached: RunOnSourceName; declare const runOnDetached: RunOnSourceName; declare const runOnInit: RunOnSourceName; declare const runOnExecute: RunOnName; export { derive, run, preventDefault, runActionExtra, runOnAttached, runOnDetached, runOnSource, runOnInit, runOnExecute, redirectToUid, redirectToPart, runWithTarget, abort, can, cutter, stopper }; //# sourceMappingURL=AlloyEvents.d.ts.map