import { Optional } from '@ephox/katamari';
import { EventArgs, SugarElement } from '@ephox/sugar';
import { AlloyBehaviourRecord } from '../behaviour/Behaviour';
import { AlloyComponent } from '../component/ComponentApi';
import { AlloyEventRecord } from '../events/AlloyEvents';
import * as Gui from './Gui';
export interface ForeignGuiSpec {
    readonly root: SugarElement<Node>;
    readonly dispatchers: Dispatcher[];
    readonly insertion?: (root: SugarElement<Node>, system: Gui.GuiSystem) => void;
}
export interface DispatchedAlloyConfig {
    readonly events?: AlloyEventRecord;
    readonly behaviours: AlloyBehaviourRecord;
    readonly eventOrder?: Record<string, string[]>;
}
export interface Dispatcher {
    readonly getTarget: (elem: SugarElement<Node>) => Optional<SugarElement<Node>>;
    readonly alloyConfig: DispatchedAlloyConfig;
}
export interface ForeignGuiDetail {
    readonly root: SugarElement<Node>;
    readonly dispatchers: Dispatcher[];
    readonly insertion: (root: SugarElement<Node>, system: Gui.GuiSystem) => void;
}
export interface ForeignGuiConnection {
    readonly dispatchTo: (type: string, event: EventArgs) => void;
    readonly unproxy: (component: AlloyComponent) => void;
    readonly disengage: () => void;
}
declare const engage: (spec: ForeignGuiSpec) => ForeignGuiConnection;
export { engage };
//# sourceMappingURL=ForeignGui.d.ts.map