"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _CellSt = require("./Cell.st.css.js");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/AnalyticsLayout/Cell/Cell.tsx";
/** Cell */
class Cell extends _react.default.PureComponent {
  constructor() {
    super(...arguments);
    this.state = {
      isHovered: false
    };
  }
  _setHover(isHovered) {
    this.setState({
      isHovered
    });
  }
  render() {
    var _this$props$showDivid;
    var {
      dataHook,
      children,
      disableHighlight,
      divider
    } = this.props;
    var {
      isHovered
    } = this.state;
    var showDivider = (_this$props$showDivid = this.props.showDivider) !== null && _this$props$showDivid !== void 0 ? _this$props$showDivid : divider;
    return /*#__PURE__*/_react.default.createElement("div", {
      "data-hook": dataHook,
      className: (0, _CellSt.st)(_CellSt.classes.root, {
        highlight: !disableHighlight && isHovered,
        showDivider
      }),
      onMouseEnter: () => this._setHover(true),
      onMouseLeave: () => this._setHover(false),
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 27,
        columnNumber: 7
      }
    }, children);
  }
}
Cell.defaultProps = {
  disableHighlight: false,
  divider: true,
  // TODO: add default value to showDivider once divider is removed
  children: null
};
Cell.displayName = 'Cell';
var _default = exports.default = Cell;
//# sourceMappingURL=Cell.js.map