import { __decorate, __metadata } from "tslib";
import { DynamicOutput, PureRelationsComponent } from '@anglr/dynamic/relations';
import { RelationsEditorMetadata } from '@anglr/dynamic/relations-editor';
import { nameof } from '@jscrpt/common';
import isEmpty from 'lodash-es/isEmpty';
import { EmptyRelationsMetadataLoader } from './empty.metadata';
/**
 * Empty relations component
 */
let EmptyRelations = class EmptyRelations {
    constructor() {
        //######################### public properties - implementation of RelationsComponent #########################
        //######################### public properties - dynamic outputs #########################
        /**
         * Indication whether input value is empty
         */
        this.result = true;
    }
    //######################### public methods - implementation of RelationsComponent #########################
    /**
     * @inheritdoc
     */
    ngOnChanges(changes) {
        if (nameof('value') in changes) {
            this.result = isEmpty(this.value);
        }
    }
    /**
     * @inheritdoc
     */
    invalidateVisuals() {
    }
};
__decorate([
    DynamicOutput(),
    __metadata("design:type", Object)
], EmptyRelations.prototype, "result", void 0);
EmptyRelations = __decorate([
    PureRelationsComponent(),
    RelationsEditorMetadata(EmptyRelationsMetadataLoader)
], EmptyRelations);
export { EmptyRelations };
//# sourceMappingURL=empty.relations.js.map