import _extends from "@babel/runtime/helpers/extends";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["className", "children", "responsive", "withBorder"];
import React from 'react';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import { settings } from '../../globals/js';
var prefix = settings.prefix;
/** Tables are used to make large volumes of data easy to understand and to access. */

export default function Table(_ref) {
  var _classNames;

  var className = _ref.className,
      children = _ref.children,
      responsive = _ref.responsive,
      withBorder = _ref.withBorder,
      other = _objectWithoutProperties(_ref, _excluded);

  var classes = classNames("".concat(prefix, "--table"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "--table--responsive"), responsive), _defineProperty(_classNames, "".concat(prefix, "--table--with-border"), withBorder), _classNames), className);
  return /*#__PURE__*/React.createElement("table", _extends({}, other, {
    className: classes
  }), children);
}
Table.propTypes = {
  /**
   * Provide the content for the Table, usually `<thead />` or `<tbody/>`
   */
  children: PropTypes.node,

  /**
   * Provide a custom className to be applied to the containing `<table />` node
   */
  className: PropTypes.string,

  /**
   * Displays the `<table />` as a responsive layout on small devices
   */
  responsive: PropTypes.bool,

  /**
   * Displays a border around the `<table />` node
   */
  withBorder: PropTypes.bool
};