export var FORM_ID = Symbol('form');
export var MODEL_ID = Symbol('model');
export var FIELD_ID = Symbol('field');
export var REF_ID = Symbol('ref');
export var FIELD_ARRAY_ID = Symbol('field-array');
export var SET_ID = Symbol('set');
export function isModel(maybeModel) {
    return Boolean(maybeModel === null || maybeModel === void 0 ? void 0 : maybeModel[MODEL_ID]);
}
export function isFieldModel(maybeModel) {
    return !!(maybeModel && maybeModel[FIELD_ID]);
}
export function isModelRef(maybeModelRef) {
    return !!(maybeModelRef && maybeModelRef[REF_ID]);
}
export function isFieldArrayModel(maybeModel) {
    return !!(maybeModel && maybeModel[FIELD_ARRAY_ID]);
}
export function isFieldSetModel(maybeModel) {
    return !!(maybeModel && maybeModel[SET_ID]);
}
export function isFormModel(maybeModel) {
    return !!(maybeModel && maybeModel[FORM_ID]);
}
export function typeOfModel(model) {
    if (isFieldModel(model)) {
        return 'FieldModel';
    }
    if (isFieldArrayModel(model)) {
        return 'FieldArrayModel';
    }
    if (isFieldSetModel(model)) {
        return 'FieldSetModel';
    }
    if (isFormModel(model)) {
        return 'FormModel';
    }
    if (isModelRef(model)) {
        return 'ModelRef';
    }
    if (isModel(model)) {
        return 'BasicModel';
    }
    return 'unknown';
}
