import { Objects } from '@ephox/boulder';
import { Id, Obj } from '@ephox/katamari';
import * as FunctionAnnotator from '../../debugging/FunctionAnnotator';
const premadeTag = Id.generate('alloy-premade');
const premade = (comp) => {
    Object.defineProperty(comp.element.dom, premadeTag, {
        value: comp.uid,
        writable: true
    });
    return Objects.wrap(premadeTag, comp);
};
const isPremade = (element) => Obj.has(element.dom, premadeTag);
const getPremade = (spec) => Obj.get(spec, premadeTag);
const makeApi = (f) => FunctionAnnotator.markAsSketchApi((component, ...rest) => f(component.getApis(), component, ...rest), f);
export { makeApi, premade, getPremade, isPremade };
//# sourceMappingURL=GuiTypes.js.map