import * as tslib_1 from "tslib";
import ADialog from './ADialog';
/** @internal */
var AddonDialog = /** @class */ (function (_super) {
    tslib_1.__extends(AddonDialog, _super);
    function AddonDialog(column, addons, dialog, ctx, onClick) {
        var _this = _super.call(this, dialog, {
            fullDialog: Boolean(onClick),
            resetPossible: false
        }) || this;
        _this.column = column;
        _this.addons = addons;
        _this.ctx = ctx;
        _this.onClick = onClick;
        return _this;
    }
    AddonDialog.prototype.build = function (node) {
        for (var _i = 0, _a = this.addons; _i < _a.length; _i++) {
            var addon = _a[_i];
            this.node.insertAdjacentHTML('beforeend', "<strong>" + addon.title + "</strong>");
            addon.append(this.column, node, this.dialog, this.ctx);
        }
    };
    AddonDialog.prototype.submit = function () {
        if (this.onClick) {
            this.onClick();
        }
        return true;
    };
    return AddonDialog;
}(ADialog));
export default AddonDialog;
//# sourceMappingURL=AddonDialog.js.map