import { FieldProcessor } from '@ephox/boulder';
import { Optional, Result } from '@ephox/katamari';
import { AlloyComponent } from '../api/component/ComponentApi';
import { AlloySpec, SimpleOrSketchSpec } from '../api/component/SpecTypes';
import { CompositeSketchDetail } from '../api/ui/Sketcher';
import * as UiSubstitutes from '../spec/UiSubstitutes';
import * as PartType from './PartType';
export interface GeneratedParts {
    [key: string]: (config: Record<string, any>) => ConfiguredPart;
}
export interface UnconfiguredPart {
    name: string;
    owner: string;
    uiType: string;
}
export interface ConfiguredPart extends UnconfiguredPart {
    config: Record<string, any>;
    validated: Record<string, any>;
}
export type Substitution = Record<string, UiSubstitutes.UiSubstitutesAdt>;
export interface Substitutions {
    internals: () => Substitution;
    externals: () => Record<string, () => Record<string, any>>;
}
declare const generate: (owner: string, parts: PartType.PartTypeAdt[]) => GeneratedParts;
declare const generateOne: (owner: string, pname: string, config: SimpleOrSketchSpec) => ConfiguredPart;
declare const schemas: (parts: PartType.PartTypeAdt[]) => FieldProcessor[];
declare const names: (parts: PartType.PartTypeAdt[]) => string[];
declare const substitutes: <D extends CompositeSketchDetail>(owner: string, detail: D, parts: PartType.PartTypeAdt[]) => Substitutions;
declare const components: <D extends CompositeSketchDetail>(owner: string, detail: D, internals: Substitution) => AlloySpec[];
declare const getPart: <D extends CompositeSketchDetail>(component: AlloyComponent, detail: D, partKey: string) => Optional<AlloyComponent>;
declare const getPartOrDie: <D extends CompositeSketchDetail>(component: AlloyComponent, detail: D, partKey: string) => AlloyComponent;
declare const getParts: <D extends CompositeSketchDetail>(component: AlloyComponent, detail: D, partKeys: string[]) => Record<string, () => Result<AlloyComponent, Error>>;
declare const getAllParts: <D extends CompositeSketchDetail>(component: AlloyComponent, detail: D) => Record<string, () => Result<AlloyComponent, Error>>;
declare const getAllPartNames: <D extends CompositeSketchDetail>(detail: D) => string[];
declare const getPartsOrDie: <D extends CompositeSketchDetail>(component: AlloyComponent, detail: D, partKeys: string[]) => Record<string, () => AlloyComponent>;
declare const defaultUids: (baseUid: string, partTypes: PartType.PartTypeAdt[]) => Record<string, string>;
declare const defaultUidsSchema: (partTypes: PartType.PartTypeAdt[]) => FieldProcessor;
export { generate, generateOne, schemas, names, substitutes, components, defaultUids, defaultUidsSchema, getAllParts, getAllPartNames, getPart, getPartOrDie, getParts, getPartsOrDie };
//# sourceMappingURL=AlloyParts.d.ts.map