var _defineProperty = require("@babel/runtime/helpers/defineProperty");
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
var _createClass = require("@babel/runtime/helpers/createClass");
var _possibleConstructorReturn = require("@babel/runtime/helpers/possibleConstructorReturn");
var _getPrototypeOf = require("@babel/runtime/helpers/getPrototypeOf");
var _inherits = require("@babel/runtime/helpers/inherits");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/esm/TimeTable/docs/examples/disabled.jsx";
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
/* eslint-disable */
var TimeTableExample = /*#__PURE__*/function (_React$Component) {
  "use strict";

  function TimeTableExample() {
    var _this;
    _classCallCheck(this, TimeTableExample);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _callSuper(this, TimeTableExample, [].concat(args));
    _this.state = {
      columns: [{
        title: '1',
        subtitle: 'Group',
        items: [{
          content: 'Disabled 2'
        }, {
          content: 'Draggable 1',
          disabled: false
        }, {
          content: 'Disabled 3'
        }],
        disabled: true
      }, {
        title: '2',
        subtitle: 'Group',
        items: [{
          content: 'Draggable 2',
          disabled: false
        }]
      }, {
        title: '3',
        subtitle: 'Group',
        items: [{
          content: 'Draggable Disabled 1',
          disabled: true,
          draggable: true
        }, {
          content: 'Draggable 3'
        }]
      }]
    };
    _this.handleOnAdd = function (columnIndex) {
      var columns = _this.state.columns.map(function (column, index) {
        return _objectSpread(_objectSpread({}, column), {}, {
          items: columnIndex === index ? column.items.concat({
            content: 'New Item'
          }) : column.items
        });
      });
      _this.setState({
        columns: columns
      });
    };
    _this.handleOnChange = function (columns, _ref) {
      var addedToColumnIndex = _ref.addedToColumnIndex,
        removedFromColumnIndex = _ref.removedFromColumnIndex,
        addedItemIndex = _ref.addedItemIndex,
        removedItemIndex = _ref.removedItemIndex;
      _this.setState({
        columns: columns
      });
    };
    return _this;
  }
  _inherits(TimeTableExample, _React$Component);
  return _createClass(TimeTableExample, [{
    key: "render",
    value: function render() {
      return /*#__PURE__*/React.createElement(TimeTable, {
        addItemButtonLabel: "Add Item",
        columns: this.state.columns,
        onAdd: this.handleOnAdd,
        onChange: this.handleOnChange,
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 57,
          columnNumber: 7
        }
      });
    }
  }]);
}(React.Component);