import { Step, TestLogs, TestStore } from '@ephox/agar';
import { EventUnbinder, SugarElement, SugarShadowDom } from '@ephox/sugar';
import { AlloyComponent } from '../component/ComponentApi';
import * as Gui from '../system/Gui';
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, U = string> {
    readonly root: () => T;
    readonly body: () => SugarElement<Node>;
    readonly gui: () => Gui.GuiSystem;
    readonly component: () => AlloyComponent;
    readonly store: () => TestStore<U>;
}
/**
 * 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: <T = string>(createComponent: (store: TestStore<T>, doc: SugarElement<Document>, body: SugarElement<HTMLElement>) => AlloyComponent, f: (doc: SugarElement<Document>, body: SugarElement<HTMLElement>, gui: Gui.GuiSystem, component: AlloyComponent, store: TestStore<T>) => Array<Step<any, any>>, success: () => void, failure: (err: any, logs?: TestLogs) => void) => void;
declare const bddSetup: <T = string>(createComponent: (store: TestStore<T>, doc: SugarElement<Document>, body: SugarElement<Node>) => AlloyComponent, createGui?: () => Gui.GuiSystem) => Hook<SugarElement<Document>, T>;
/**
 * Setup in a Shadow Root, run list of untyped Steps, then tear down.
 *
 * @param createComponent
 * @param f
 * @param success
 * @param failure
 */
declare const setupInShadowRoot: <T = string>(createComponent: (store: TestStore<T>, doc: SugarElement<ShadowRoot>, body: SugarElement<Node>) => AlloyComponent, f: (doc: SugarElement<ShadowRoot>, body: SugarElement<Node>, gui: Gui.GuiSystem, component: AlloyComponent, store: TestStore<T>) => Array<Step<any, any>>, success: () => void, failure: (err: any, logs?: TestLogs) => void) => void;
declare const bddSetupInShadowRoot: <T = string>(createComponent: (store: TestStore<T>, doc: SugarElement<ShadowRoot>, body: SugarElement<Node>) => AlloyComponent, createGui?: () => Gui.GuiSystem) => Hook<SugarElement<ShadowRoot>, T>;
declare const setupInBodyAndShadowRoot: <T = string>(createComponent: (store: TestStore<T>, doc: RootNode, body: SugarElement<Node>) => AlloyComponent, f: (doc: RootNode, body: SugarElement<Node>, gui: Gui.GuiSystem, component: AlloyComponent, store: TestStore<T>) => Array<Step<any, any>>, success: () => void, failure: (err: any, logs?: TestLogs) => 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, C = string>(createComponent: (store: TestStore<C>, doc: SugarElement<Document>, body: SugarElement<HTMLElement>) => AlloyComponent, f: (doc: SugarElement<Document>, body: SugarElement<HTMLElement>, gui: Gui.GuiSystem, component: AlloyComponent, store: TestStore<C>) => Step<A, B>, success: () => void, failure: (err: any, logs?: TestLogs) => 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