"use strict";

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

var _reactDom = _interopRequireDefault(require("react-dom"));

var _ = _interopRequireDefault(require(".."));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var onRowClick = function onRowClick(record, index, e) {
  console.log(record, index, e);
},
    dataSource = function dataSource() {
  var result = [];

  for (var i = 0; i < 5; i++) {
    result.push({
      title: {
        name: "Quotation for 1PCS Nano ".concat(3 + i, ".0 controller compatible")
      },
      id: 100306660940 + i,
      year: i === 0 ? '-' : "2019-10-2".concat(3 + i),
      month: "16:39:".concat(23 + i)
    });
  }

  return result;
},
    cellProps = function cellProps(rowIndex, colIndex) {
  if (rowIndex === 2 && colIndex === 1) {
    return {
      // take 3 rows's space
      rowSpan: 3
    };
  }

  if (rowIndex === 0 && colIndex === 2) {
    return {
      // take 2 cols' space
      colSpan: 2
    };
  }
};

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(_["default"], {
  dataSource: dataSource(),
  onRowClick: onRowClick,
  cellProps: cellProps
}, /*#__PURE__*/_react["default"].createElement(_["default"].Column, {
  title: "Id",
  dataIndex: "id"
}), /*#__PURE__*/_react["default"].createElement(_["default"].Column, {
  title: "Title",
  dataIndex: "title.name"
}), /*#__PURE__*/_react["default"].createElement(_["default"].Column, {
  title: "Time",
  colSpan: 2,
  dataIndex: "year"
}), /*#__PURE__*/_react["default"].createElement(_["default"].Column, {
  colSpan: 0,
  dataIndex: "month"
})), document.getElementById('table-demo-9'));