"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Primitive_1 = require("../../../../Primitive");
const _ids_1 = require("../../../_ids");
class Spark extends Primitive_1.Primitive {
    constructor(system) {
        super({
            i: ['a'],
            o: ['a'],
        }, {}, system, _ids_1.ID_SPARK);
        this._ran = false;
    }
    onDataInputInvalid(name) {
        this._ran = false;
    }
    onDataInputDrop(name, data) {
        this._ran = false;
    }
    onDataInputData(name, data) {
        if (this._paused || this._ran) {
            return;
        }
        this._ran = true;
        this._output.a.push(data);
    }
}
exports.default = Spark;
//# sourceMappingURL=index.js.map