"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 }; }

// import { Table } from '@alifd/next';
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 render = function render(value, index, record) {
  return /*#__PURE__*/_react["default"].createElement("a", {
    href: "javascript:;"
  }, "Remove(", record.id, ")"); // eslint-disable-line
};

var columns = [{
  title: 'Title1',
  dataIndex: 'id',
  width: 140
}, {
  title: 'Group2-7',
  children: [{
    title: 'Title2',
    dataIndex: 'id',
    width: 140
  }, {
    title: 'Title3',
    dataIndex: 'title.name',
    lock: true,
    width: 200
  }, {
    title: 'Group4-7',
    children: [{
      title: 'Title4',
      dataIndex: 'title.name',
      width: 400
    }, {
      title: 'Title5',
      dataIndex: 'title.name',
      width: 200
    }, {
      title: 'tet',
      children: [{
        title: 'Title6',
        dataIndex: 'title.name',
        width: 400
      }, {
        title: 'Title7',
        dataIndex: 'title.name',
        width: 200
      }]
    }]
  }]
}, {
  title: '',
  children: [{
    title: 'Time',
    dataIndex: 'time',
    width: 500
  }, {
    cell: render,
    width: 200
  }]
}];

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(_["default"], {
  columns: columns,
  hasBorder: true,
  dataSource: dataSource()
}), document.getElementById('table-demo-2'));