"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Semifunctional_1 = require("../../../../../Class/Semifunctional");
const _ids_1 = require("../../../../_ids");
class DropTarget extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['component'],
            i: [],
            o: ['items'],
        }, {
            input: {
                component: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_DROP_TARGET);
    }
    async f({ component }, done) {
        // console.log('DropTarget', 'f')
        const { api: { window: { setTimeout }, }, } = this.__system;
        setTimeout(() => {
            component.emit('call', { method: 'attachDropTarget', data: [] });
        }, 0);
        component.addListener('drop', (items) => {
            this._output.items.push(items);
        });
    }
}
exports.default = DropTarget;
//# sourceMappingURL=index.js.map