import { Optional } from '@ephox/katamari';
import { AlloySpec } from '../api/component/SpecTypes';
import { CompositeSketchDetail } from '../api/ui/Sketcher';
interface Replacement {
    readonly name: () => string;
    readonly required: () => boolean;
    readonly used: () => boolean;
    readonly replace: () => UiSubstitutesAdt;
}
declare type ValueThunkFn<R> = <D extends CompositeSketchDetail>(detail: D, spec?: Record<string, any>, partValidated?: Record<string, any>) => R;
declare type SingleSubstitution<T> = (required: boolean, valueThunk: ValueThunkFn<AlloySpec>) => T;
declare type MultipleSubstitution<T> = (required: boolean, valueThunk: ValueThunkFn<AlloySpec[]>) => T;
export interface UiSubstitutesAdt {
    fold: <T>(single: SingleSubstitution<T>, multiple: MultipleSubstitution<T>) => T;
    match: <T>(branches: {
        single: SingleSubstitution<T>;
        multiple: MultipleSubstitution<T>;
    }) => T;
    log: (label: string) => void;
}
declare const substituteAll: <D extends CompositeSketchDetail>(owner: Optional<string>, detail: D, components: AlloySpec[], placeholders: Record<string, Replacement>) => AlloySpec[];
declare const substitutePlaces: <D extends CompositeSketchDetail>(owner: Optional<string>, detail: D, components: AlloySpec[], placeholders: Record<string, UiSubstitutesAdt>) => AlloySpec[];
declare const singleReplace: <D extends CompositeSketchDetail>(detail: D, p: UiSubstitutesAdt) => AlloySpec[];
declare const single: SingleSubstitution<UiSubstitutesAdt>;
declare const multiple: MultipleSubstitution<UiSubstitutesAdt>;
declare const placeholder: () => string;
export { single, multiple, placeholder, substituteAll, substitutePlaces, singleReplace };
//# sourceMappingURL=UiSubstitutes.d.ts.map