"use strict";
/*eslint no-useless-constructor: 0*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.UIControlRegistration = exports.ControlRegistrationClass = exports.RegisterFormControl = exports.RegistrationData = exports.ControlType = void 0;
// decorator function to create registry for unpacking json
var ControlType;
(function (ControlType) {
    ControlType["Control"] = "Control";
    ControlType["Container"] = "Container";
})(ControlType = exports.ControlType || (exports.ControlType = {}));
class RegistrationData {
    category;
    name;
    icon;
    typeOfControl;
    prototype;
    constructor(prototype, category, name, typeOfControl = ControlType.Control, icon) {
        this.prototype = prototype;
        this.category = category;
        this.name = name;
        this.icon = icon;
        this.typeOfControl = typeOfControl;
    }
    create() {
        throw new Error("not implemented");
    }
}
exports.RegistrationData = RegistrationData;
function RegisterFormControl(controlExample, category, typeOfControl = ControlType.Control, icon) {
    let prototype = Object.getPrototypeOf(controlExample);
    let name = controlExample.__type;
    exports.UIControlRegistration[name] = new RegistrationData(prototype, category, name, typeOfControl, icon);
}
exports.RegisterFormControl = RegisterFormControl;
class ControlRegistrationClass {
}
exports.ControlRegistrationClass = ControlRegistrationClass;
exports.UIControlRegistration = new ControlRegistrationClass();
//# sourceMappingURL=RegisterUIControl.js.map