import { __decorate, __metadata } from "tslib";
import { Input } from '@angular/core';
import { DynamicOutput, PureRelationsComponent } from '@anglr/dynamic/relations';
import { RelationsEditorMetadata } from '@anglr/dynamic/relations-editor';
import { nameof } from '@jscrpt/common';
import { MathMultiplyRelationsMetadataLoader } from './multiply.metadata';
let MathMultiplyRelations = class MathMultiplyRelations {
    //######################### public methods #########################
    invalidateVisuals() {
    }
    ngOnChanges(changes) {
        if (nameof('input1') in changes ||
            nameof('input2') in changes) {
            if (!this.input1 ||
                !this.input2) {
                this.result = 0;
                return;
            }
            this.result = this.input1 * this.input2;
        }
    }
};
__decorate([
    Input(),
    __metadata("design:type", Object)
], MathMultiplyRelations.prototype, "input1", void 0);
__decorate([
    Input(),
    __metadata("design:type", Object)
], MathMultiplyRelations.prototype, "input2", void 0);
__decorate([
    DynamicOutput(),
    __metadata("design:type", Object)
], MathMultiplyRelations.prototype, "result", void 0);
MathMultiplyRelations = __decorate([
    PureRelationsComponent(),
    RelationsEditorMetadata(MathMultiplyRelationsMetadataLoader)
], MathMultiplyRelations);
export { MathMultiplyRelations };
//# sourceMappingURL=multiply.relations.js.map