"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Semifunctional_1 = require("../../../../../../Class/Semifunctional");
const Array_1 = require("../../../../../../wrap/Array");
const _ids_1 = require("../../../../../_ids");
class Uint8Array0 extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['init'],
            fo: ['array'],
            i: ['done'],
            o: [],
        }, {
            output: {
                array: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_8BIT_UNSIGNED_ARRAY_0);
    }
    f({ init }, done) {
        const _array = new Uint8Array(init);
        const array = (0, Array_1.wrapUint8Array)(_array, this.__system);
        done({
            array,
        });
    }
    onIterDataInputData(name, data) {
        if (name === 'done') {
            this._forward_all_empty();
            this._backward('init');
            this._backward('done');
        }
    }
}
exports.default = Uint8Array0;
//# sourceMappingURL=index.js.map