import { __assign, __extends } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import { PureComponent } from 'react';
import { getLeafColumns } from './utils';
var ColGroup = (function (_super) {
    __extends(ColGroup, _super);
    function ColGroup() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ColGroup.prototype.render = function () {
        var columns = this.props.columns;
        var leafColumns = getLeafColumns(columns);
        var cols = (leafColumns || []).map(function (c, index) {
            var width = typeof c.width === 'number' ? c.width + "px" : c.width;
            return _jsx("col", { style: { width: width, minWidth: width }, "data-zv": 'v10.0.12' }, c.key || index);
        });
        return _jsx("colgroup", __assign({ "data-zv": 'v10.0.12' }, { children: cols }), void 0);
    };
    return ColGroup;
}(PureComponent));
export default ColGroup;
