"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.RowNumberCell = void 0;
var _react = _interopRequireDefault(require("react"));
var _Box = _interopRequireDefault(require("../../Box"));
var _Checkbox = _interopRequireDefault(require("../../Checkbox/Checkbox"));
var _Text = _interopRequireDefault(require("../../Text/Text"));
var _RowNumberCellSt = require("./RowNumberCell.st.css.js");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Table/components/RowNumberCell.jsx",
  _this = void 0;
var RowNumberCell = exports.RowNumberCell = function RowNumberCell(_ref) {
  var rowNum = _ref.rowNum,
    checked = _ref.checked,
    disabled = _ref.disabled,
    tooltipContent = _ref.tooltipContent,
    dataHook = _ref.dataHook;
  var checkbox = /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
    disabled: disabled,
    dataHook: dataHook,
    checked: checked,
    tooltipProps: {
      disabled: !tooltipContent
    },
    tooltipContent: tooltipContent,
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 15,
      columnNumber: 5
    }
  });
  return /*#__PURE__*/_react["default"].createElement(_Box["default"], {
    dataHook: "row-number-cell",
    className: _RowNumberCellSt.classes.root,
    align: "center",
    verticalAlign: "middle",
    width: "100%",
    height: "100%",
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 25,
      columnNumber: 5
    }
  }, checked ? checkbox : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
    "data-hook": "row-number-text",
    className: _RowNumberCellSt.classes.rowNumberText,
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 37,
      columnNumber: 11
    }
  }, /*#__PURE__*/_react["default"].createElement(_Text["default"], {
    size: "tiny",
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 38,
      columnNumber: 13
    }
  }, rowNum + 1)), /*#__PURE__*/_react["default"].createElement("span", {
    "data-hook": "row-number-checkbox",
    className: _RowNumberCellSt.classes.rowNumberCheckbox,
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 40,
      columnNumber: 11
    }
  }, checkbox)));
};