import * as tslib_1 from "tslib";
import { cssClass, engineCssClass } from '../../styles';
import ADialog from './ADialog';
/** @internal */
var NumberFilterDialog = /** @class */ (function (_super) {
    tslib_1.__extends(NumberFilterDialog, _super);
    function NumberFilterDialog(column, dialog, ctx) {
        var _this = _super.call(this, dialog) || this;
        _this.column = column;
        _this.ctx = ctx;
        _this.summary = ctx.summaryRenderer(_this.column, true);
        return _this;
    }
    NumberFilterDialog.prototype.build = function (node) {
        node.classList.add(cssClass('dialog-mapper'));
        // patch in lu-summary and renderer
        var summary = this.ctx.asElement(this.summary.template);
        summary.classList.add(cssClass('summary'), cssClass('renderer'));
        summary.dataset.renderer = this.column.getSummaryRenderer();
        summary.dataset.interactive = '';
        node.appendChild(summary);
        var summaryNode = this.node.getElementsByClassName(cssClass('summary'))[0];
        var r = this.summary.update(summaryNode);
        if (!r) {
            return;
        }
        summaryNode.classList.add(engineCssClass('loading'));
        r.then(function () {
            summaryNode.classList.remove(engineCssClass('loading'));
        });
    };
    return NumberFilterDialog;
}(ADialog));
export default NumberFilterDialog;
//# sourceMappingURL=NumberFilterDialog.js.map