"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 Uint8ClampedArray_ extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['length'],
            fo: ['array'],
            i: ['done'],
            o: [],
        }, {
            output: {
                array: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_8BIT_UNSIGNED_CLAMPED_ARRAY);
    }
    f({ length }, done) {
        const _array = new Uint8ClampedArray(length);
        const array = (0, Array_1.wrapUint8Array)(_array, this.__system);
        done({
            array,
        });
    }
    onIterDataInputData(name, data) {
        if (name === 'done') {
            this._forward_all_empty();
            this._backward('length');
            this._backward('done');
        }
    }
}
exports.default = Uint8ClampedArray_;
//# sourceMappingURL=index.js.map