"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../../Class/Functional");
const _ids_1 = require("../../../../../_ids");
class Start0 extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['node', 'opt'],
            o: [],
        }, {
            input: {
                node: {
                    ref: true,
                },
            },
            output: {},
        }, system, _ids_1.ID_START);
    }
    async f({ node, opt }, done, fail) {
        try {
            const { start = 0, offset = undefined, duration = undefined } = opt;
            node.start(start, offset, duration);
        }
        catch (err) {
            fail(err.message.toLowerCase());
            return;
        }
        done({});
    }
}
exports.default = Start0;
//# sourceMappingURL=index.js.map