import { __decorate, __metadata } from "tslib";
import { DebugData, DynamicOutput, PureRelationsComponent } from '@anglr/dynamic/relations';
import { RelationsEditorMetadata } from '@anglr/dynamic/relations-editor';
import { nameof } from '@jscrpt/common';
import { ValueRelationsMetadataLoader } from './value.metadata';
//TODO: change all TOptions for specific value and relations options too
/**
 * Value relations component
 */
let ValueRelations = class ValueRelations {
    //######################### public properties - implementation of RelationsComponent #########################
    /**
     * @inheritdoc
     */
    get relationsOptions() {
        return this.ɵRelationsOptions;
    }
    set relationsOptions(value) {
        var _a, _b;
        this.ɵRelationsOptions = value;
        this.value = (_b = (_a = this.ɵRelationsOptions) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null;
    }
    /**
     * @inheritdoc
     */
    invalidateVisuals() {
    }
};
__decorate([
    DynamicOutput(),
    __metadata("design:type", Object)
], ValueRelations.prototype, "value", void 0);
ValueRelations = __decorate([
    DebugData({
        outputs: [
            nameof('value'),
        ],
    }),
    PureRelationsComponent(),
    RelationsEditorMetadata(ValueRelationsMetadataLoader)
], ValueRelations);
export { ValueRelations };
//# sourceMappingURL=value.relations.js.map