"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Field = void 0;
const Element_1 = require("./Element");
class Field extends Element_1.Element_ {
    constructor({ i = [], o = [] }, opt, system, id) {
        super({
            i,
            o,
        }, opt, system, id);
        this.addListener('play', () => {
            this._output.value.push(this.initialValue());
        });
    }
    initialValue() {
        var _a, _b, _c;
        // @ts-ignore
        return (_c = (_b = (_a = this._input) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.peak()) !== null && _c !== void 0 ? _c : this._defaultState.value;
    }
}
exports.Field = Field;
//# sourceMappingURL=Field.js.map