"use strict";

var _button = _interopRequireDefault(require("../../button"));

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 columns = new Array(4).fill({
  dataIndex: 'data',
  title: 'Data',
  width: 200
});
columns.unshift({
  dataIndex: 'id',
  title: 'Id',
  width: 100,
  lock: 'left'
});
columns.push({
  dataIndex: 'state',
  title: 'State',
  width: 200
});
columns.push({
  title: 'Action',
  width: 100,
  align: 'center',
  cell: function cell() {
    return /*#__PURE__*/_react["default"].createElement(_button["default"], null, "delete");
  },
  lock: 'right'
});
var dataSource = [{
  id: 30000,
  data: '$13.02',
  state: 'normal'
}, {
  id: 30001,
  data: '$16.02',
  state: 'normal'
}, {
  id: 30002,
  data: '$63.0002',
  state: 'error'
}];

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(_["default"].StickyLock, {
  dataSource: dataSource,
  cellProps: function cellProps(rowIndex, colIndex) {
    if (colIndex === 0) {
      return {
        colSpan: 1,
        rowSpan: 2
      };
    }

    if (colIndex === columns.length - 1) {
      return {
        colSpan: 1,
        rowSpan: 3
      };
    }
  }
}, columns.map(function (col, i) {
  return /*#__PURE__*/_react["default"].createElement(_["default"].Column, _extends({
    key: i
  }, col));
})), document.getElementById('table-demo-10'));