"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.GridCell = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));

var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

var _react = _interopRequireDefault(require("react"));

var _ListHighlight = require("./ListHighlight");

var _classnames = _interopRequireDefault(require("classnames"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var GridCell =
/*#__PURE__*/
function (_React$Component) {
  (0, _inheritsLoose2.default)(GridCell, _React$Component);

  function GridCell() {
    return _React$Component.apply(this, arguments) || this;
  }

  var _proto = GridCell.prototype;

  _proto.render = function render() {
    var _this$props = this.props,
        testAutomationId = _this$props.testAutomationId,
        children = _this$props.children,
        className = _this$props.className,
        textWrap = _this$props.textWrap,
        props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["testAutomationId", "children", "className", "textWrap"]);
    var classNames = (0, _classnames.default)(className, {
      'text-wrap': textWrap
    });
    return _react.default.createElement("td", (0, _extends2.default)({
      "data-test-automation-id": testAutomationId,
      className: classNames
    }, props), _react.default.createElement(_ListHighlight.ListHighlight, null, children));
  };

  return GridCell;
}(_react.default.Component);

exports.GridCell = GridCell;
(0, _defineProperty2.default)(GridCell, "propTypes", {
  className: _propTypes.default.string,
  children: _propTypes.default.node,
  textWrap: _propTypes.default.bool,
  testAutomationId: _propTypes.default.string
});
(0, _defineProperty2.default)(GridCell, "defaultProps", {
  className: null,
  children: null,
  textWrap: false,
  testAutomationId: null
});