"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../Class/Functional");
const _ids_1 = require("../../../../_ids");
class Dispatch extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['element', 'event', 'data', 'opt'],
            o: [],
        }, {
            input: {
                element: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_DISPATCH);
    }
    f({ element, event, data, opt }, done) {
        const _event = `_${event}`;
        element.emit('call', {
            method: 'dispatchEvent',
            data: [event, data, opt.bubbles],
        });
        done();
    }
}
exports.default = Dispatch;
//# sourceMappingURL=index.js.map