define(["require", "exports", "tslib", "react", "../../Utilities", "../../FocusZone"], function (require, exports, tslib_1, React, Utilities_1, FocusZone_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var getClassNames = Utilities_1.classNamesFunction();
    var GridBase = /** @class */ (function (_super) {
        tslib_1.__extends(GridBase, _super);
        function GridBase(props) {
            var _this = _super.call(this, props) || this;
            _this._id = Utilities_1.getId();
            return _this;
        }
        GridBase.prototype.render = function () {
            var _this = this;
            var _a = this.props, items = _a.items, columnCount = _a.columnCount, onRenderItem = _a.onRenderItem, positionInSet = _a.positionInSet, setSize = _a.setSize, getStyles = _a.getStyles;
            var classNames = getClassNames(getStyles, { theme: this.props.theme });
            // Array to store the cells in the correct row index
            var rowsOfItems = Utilities_1.toMatrix(items, columnCount);
            var content = (React.createElement("table", { id: this._id, role: 'grid', "aria-posinset": positionInSet, "aria-setsize": setSize, className: classNames.root },
                React.createElement("tbody", null, rowsOfItems.map(function (rows, rowIndex) {
                    return (React.createElement("tr", { role: 'row', key: _this._id + '-' + rowIndex + '-row' }, rows.map(function (cell, cellIndex) {
                        return (React.createElement("td", { role: 'presentation', key: _this._id + '-' + cellIndex + '-cell', className: classNames.tableCell }, onRenderItem(cell, cellIndex)));
                    })));
                }))));
            // Create the table/grid
            return (this.props.doNotContainWithinFocusZone ? content : (React.createElement(FocusZone_1.FocusZone, { isCircularNavigation: this.props.shouldFocusCircularNavigate, className: classNames.focusedContainer, onBlur: this.props.onBlur }, content)));
        };
        return GridBase;
    }(Utilities_1.BaseComponent));
    exports.GridBase = GridBase;
});
//# sourceMappingURL=Grid.base.js.map