"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Holder_1 = require("../../../../../Class/Holder");
const _ids_1 = require("../../../../_ids");
class Detach extends Holder_1.Holder {
    constructor(system) {
        super({
            fi: ['component', 'host', 'opt'],
            fo: [],
        }, {
            input: {
                component: {
                    ref: true,
                },
                host: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_DETACH);
    }
    f({ component, host, opt }, done) {
        this._unlisten = component.detach(host, opt);
    }
    d() {
        if (this._unlisten) {
            this._unlisten();
            this._unlisten = undefined;
        }
    }
}
exports.default = Detach;
//# sourceMappingURL=index.js.map