"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 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,
      time: 2000 + i
    });
  }

  return result;
};

var propsConf = {
  className: 'next-myclass',
  style: {
    background: 'black',
    color: 'white'
  },
  onDoubleClick: function onDoubleClick() {
    console.log('doubleClicked');
  }
};

var setRowProps = function setRowProps(record, index) {
  if (index === 2) {
    return propsConf;
  }
};

var setCellProps = function setCellProps(rowIndex, colIndex, dataIndex, record) {
  if (rowIndex === 0 && colIndex === 0) {
    console.log(record);
    return propsConf;
  }
};

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(_["default"], {
  dataSource: dataSource(),
  rowProps: setRowProps,
  cellProps: setCellProps
}, /*#__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",
  dataIndex: "time"
})), document.getElementById('table-demo-24'));