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