"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PanelWithRow = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const Panel_1 = tslib_1.__importDefault(require("../../../components/Panel"));
const Flex_1 = require("../../../components/Flex");
// We cannot destructure this.props using the react way in typescript which is a real pain as you
// need to transfer props individually as a consequence
// let { buttonContent, ...other } = this.props
class PanelWithRow extends React.Component {
    render() {
        const headerItems = this.props.colItems.map((colItem, index) => (React.createElement(Flex_1.Box, { key: colItem.key || colItem.Content || index, className: "twa:font-bold twa:text-3 twa:px-1", style: {
                flex: colItem.Size,
            } }, colItem.Content)));
        const header = (React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:w-full" }, headerItems));
        return (React.createElement("div", { style: this.props.style, className: this.props.className },
            React.createElement(Panel_1.default, { bodyScroll: true, header: header, border: this.props.border, bodyProps: this.props.bodyProps }, this.props.children)));
    }
}
exports.PanelWithRow = PanelWithRow;
