"use strict";

var _icon = _interopRequireDefault(require("../../icon"));

var _loading = _interopRequireDefault(require("../../loading"));

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

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

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

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

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

var indicator = /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
  type: "loading"
}));

var CustomLoading = function CustomLoading(props) {
  return /*#__PURE__*/_react["default"].createElement(_loading["default"], _extends({
    indicator: indicator
  }, props));
};

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(_["default"], {
  dataSource: dataSource(),
  loading: true,
  loadingComponent: CustomLoading
}, /*#__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"
}), /*#__PURE__*/_react["default"].createElement(_["default"].Column, {
  cell: render
})), document.getElementById('table-demo-23'));