function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

/*
Copyright (c) 2018-2019 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { StyledTable, StyledHead, StyledHeadCell, StyledBody, StyledRow, StyledCell } from './styled-components.js';
export default class Table extends React.Component {
  render() {
    return React.createElement(StyledTable, {
      "data-baseweb": "table",
      "aria-colcount": this.props.columns.length,
      "aria-rowcount": this.props.data.length
    }, React.createElement(StyledHead, {
      $width: this.props.horizontalScrollWidth
    }, this.props.columns.map((column, index) => React.createElement(StyledHeadCell, {
      key: index
    }, column))), React.createElement(StyledBody, {
      $width: this.props.horizontalScrollWidth
    }, this.props.data.map((row, index) => React.createElement(StyledRow, {
      key: index
    }, row.map((cell, cellIndex) => React.createElement(StyledCell, {
      key: cellIndex
    }, cell))))));
  }

}

_defineProperty(Table, "defaultProps", {
  columns: [],
  data: [[]],
  isLoading: false
});