import { FieldProcessor } from '@ephox/boulder';
import * as AlloyParts from '../../parts/AlloyParts';
import { PartTypeAdt } from '../../parts/PartType';
import { BaseSketchDetail, BaseSketchSpec } from '../../spec/SpecSchema';
import { AlloyComponent } from '../component/ComponentApi';
import { AlloySpec, SketchSpec } from '../component/SpecTypes';
import * as UiSketcher from './UiSketcher';
export interface SingleSketchSpec extends BaseSketchSpec {
}
export interface SingleSketchDetail extends BaseSketchDetail<SingleSketchSpec> {
}
type SketcherApisFunc<A, R> = (apis: A, comp: AlloyComponent, ...rest: any[]) => R;
type FunctionRecord<A> = {
    [K in keyof A]: Function;
};
export interface SingleSketch<S extends SingleSketchSpec> {
    readonly name: string;
    readonly configFields: FieldProcessor[];
    readonly sketch: (spec: S) => SketchSpec;
}
export interface SingleSketcherSpec<S extends SingleSketchSpec, D extends SingleSketchDetail, A extends FunctionRecord<A>, E extends FunctionRecord<E> = {}> {
    name: string;
    factory: UiSketcher.SingleSketchFactory<D, S>;
    configFields: FieldProcessor[];
    apis?: Record<string, SketcherApisFunc<A, any>>;
    extraApis?: E;
}
export interface SingleSketcherRawDetail<S extends SingleSketchSpec, D extends SingleSketchDetail, A extends FunctionRecord<A>, E extends FunctionRecord<E> = {}> {
    name: string;
    factory: UiSketcher.SingleSketchFactory<D, S>;
    configFields: FieldProcessor[];
    apis: Record<string, SketcherApisFunc<A, any>>;
    extraApis: E;
}
export interface CompositeSketchSpec extends BaseSketchSpec {
}
export interface CompositeSketchDetail extends BaseSketchDetail<CompositeSketchSpec> {
    parts: Record<string, any>;
    partUids: Record<string, string>;
}
export interface CompositeSketch<S extends CompositeSketchSpec> {
    readonly name: string;
    readonly configFields: FieldProcessor[];
    readonly partFields: PartTypeAdt[];
    readonly sketch: (spec: S) => SketchSpec;
    readonly parts: AlloyParts.GeneratedParts;
}
export interface CompositeSketcherSpec<S extends CompositeSketchSpec, D extends CompositeSketchDetail, A extends FunctionRecord<A>, E extends FunctionRecord<E> = {}> {
    name: string;
    factory: UiSketcher.CompositeSketchFactory<D, S>;
    configFields: FieldProcessor[];
    partFields: PartTypeAdt[];
    apis?: Record<string, SketcherApisFunc<A, any>>;
    extraApis?: E;
}
export interface CompositeSketcherRawDetail<S extends CompositeSketchSpec, D extends CompositeSketchDetail, A extends FunctionRecord<A>, E extends FunctionRecord<E> = {}> {
    name: string;
    factory: UiSketcher.CompositeSketchFactory<D, S>;
    configFields: FieldProcessor[];
    partFields: PartTypeAdt[];
    apis: Record<string, SketcherApisFunc<A, any>>;
    extraApis: E;
}
export declare const isSketchSpec: (spec: AlloySpec) => spec is SketchSpec;
declare const single: <S extends SingleSketchSpec, D extends SingleSketchDetail, A extends FunctionRecord<A>, E extends FunctionRecord<E> = {}>(rawConfig: SingleSketcherSpec<S, D, A, E>) => SingleSketch<S> & A & E;
declare const composite: <S extends CompositeSketchSpec, D extends CompositeSketchDetail, A extends FunctionRecord<A>, E extends FunctionRecord<E> = {}>(rawConfig: CompositeSketcherSpec<S, D, A, E>) => CompositeSketch<S> & A & E;
export { single, composite };
//# sourceMappingURL=Sketcher.d.ts.map