import { Step, TestLogs } from '@ephox/agar';
import { EventUnbinder, SugarElement, SugarShadowDom } from '@ephox/sugar';
import { AlloyComponent } from '../component/ComponentApi';
import * as Gui from '../system/Gui';
import { TestStore } from './TestStore';
declare type RootNode = SugarShadowDom.RootNode;
export interface KeyLoggerState {
    readonly log: string[];
    readonly onKeydown: EventUnbinder;
}
interface StyleState {
    readonly style: SugarElement<HTMLStyleElement>;
}
export interface Hook<T extends RootNode> {
    readonly root: () => T;
    readonly body: () => SugarElement<Node>;
    readonly gui: () => Gui.GuiSystem;
    readonly component: () => AlloyComponent;
    readonly store: () => TestStore;
}
/**
 * Setup in the body, run list of untyped Steps, then tear down.
 * Use #guiSetup for type-safe steps.
 *
 * @param createComponent
 * @param f
 * @param success
 * @param failure
 */
declare const setup: (createComponent: (store: TestStore, doc: SugarElement<Document>, body: SugarElement<HTMLElement>) => AlloyComponent, f: (doc: SugarElement<Document>, body: SugarElement<HTMLElement>, gui: Gui.GuiSystem, component: AlloyComponent, store: TestStore) => Array<Step<any, any>>, success: () => void, failure: (err: any, logs?: TestLogs | undefined) => void) => void;
declare const bddSetup: (createComponent: (store: TestStore, doc: SugarElement<Document>, body: SugarElement<Node>) => AlloyComponent) => Hook<SugarElement<Document>>;
/**
 * Setup in a Shadow Root, run list of untyped Steps, then tear down.
 *
 * @param createComponent
 * @param f
 * @param success
 * @param failure
 */
declare const setupInShadowRoot: (createComponent: (store: TestStore, doc: SugarElement<ShadowRoot>, body: SugarElement<Node>) => AlloyComponent, f: (doc: SugarElement<ShadowRoot>, body: SugarElement<Node>, gui: Gui.GuiSystem, component: AlloyComponent, store: TestStore) => Array<Step<any, any>>, success: () => void, failure: (err: any, logs?: TestLogs | undefined) => void) => void;
declare const bddSetupInShadowRoot: (createComponent: (store: TestStore, doc: SugarElement<ShadowRoot>, body: SugarElement<Node>) => AlloyComponent) => Hook<SugarElement<ShadowRoot>>;
declare const setupInBodyAndShadowRoot: (createComponent: (store: TestStore, doc: RootNode, body: SugarElement<Node>) => AlloyComponent, f: (doc: RootNode, body: SugarElement<Node>, gui: Gui.GuiSystem, component: AlloyComponent, store: TestStore) => Array<Step<any, any>>, success: () => void, failure: (err: any, logs?: TestLogs | undefined) => void) => void;
/**
 * Setup in the body, run a typed Step, then tear down.
 * If you need to run multiple Steps, compose them using the functions in StepSequence.
 *
 * @param createComponent
 * @param f
 * @param success
 * @param failure
 */
declare const guiSetup: <A, B>(createComponent: (store: TestStore, doc: SugarElement<Document>, body: SugarElement<HTMLElement>) => AlloyComponent, f: (doc: SugarElement<Document>, body: SugarElement<HTMLElement>, gui: Gui.GuiSystem, component: AlloyComponent, store: TestStore) => Step<A, B>, success: () => void, failure: (err: any, logs?: TestLogs | undefined) => void) => void;
declare const setupKeyLogger: (body: SugarElement<Node>) => KeyLoggerState;
declare const teardownKeyLogger: (state: KeyLoggerState, expected: string[]) => void;
declare const addStyles: (dos: RootNode, styles: string[]) => SugarElement<HTMLStyleElement>;
declare const removeStyles: (style: SugarElement<HTMLStyleElement>) => void;
declare const bddAddStyles: (dos: RootNode, styles: string[]) => void;
declare const mSetupKeyLogger: <T>(body: SugarElement<Node>) => Step<T, T & KeyLoggerState>;
declare const mTeardownKeyLogger: <T>(body: SugarElement<Node>, expected: string[]) => Step<T & KeyLoggerState, T>;
declare const mAddStyles: <T>(dos: RootNode, styles: string[]) => Step<T, T & StyleState>;
declare const mRemoveStyles: Step<StyleState, unknown>;
export { setup, setupInShadowRoot, setupInBodyAndShadowRoot, guiSetup, bddSetup, bddSetupInShadowRoot, setupKeyLogger, teardownKeyLogger, addStyles, removeStyles, bddAddStyles, mSetupKeyLogger, mTeardownKeyLogger, mAddStyles, mRemoveStyles };
//# sourceMappingURL=GuiSetup.d.ts.map