'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = undefined;

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _mxa = require('../../components/mxa');

var _TabPaneHeader = require('./TabPaneHeader');

var _TabPaneHeader2 = _interopRequireDefault(_TabPaneHeader);

var _home = require('../styles/views/home.less');

var _home2 = _interopRequireDefault(_home);

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

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * Created by vison on 16/11/30.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */


var ScheduleList = function (_React$Component) {
  _inherits(ScheduleList, _React$Component);

  function ScheduleList(props) {
    _classCallCheck(this, ScheduleList);

    var _this = _possibleConstructorReturn(this, (ScheduleList.__proto__ || Object.getPrototypeOf(ScheduleList)).call(this, props));

    _this.callback = function (key) {
      console.log(key);
    };

    _this.renderMaskItem = function () {
      var maskList = _this.props.dataSource;
      if (maskList && maskList.length > 0) {
        return maskList.map(function (item, index) {
          return _react2.default.createElement(
            _mxa.Collapse.Panel,
            { header: item.title, key: index },
            _react2.default.createElement(
              'p',
              null,
              'aaaaa'
            )
          );
        });
      }
      return null;
    };

    _this.renderMaskReminder = function () {
      return _react2.default.createElement(
        'div',
        null,
        _react2.default.createElement(
          _mxa.Collapse,
          { bordered: false, onChange: _this.callback },
          _this.renderMaskItem()
        )
      );
    };

    _this.renderDateTime = function () {
      return _react2.default.createElement(
        'h1',
        null,
        '2016\u5E7412\u67082\u65E5 \u661F\u671F\u56DB'
      );
    };

    _this.state = {
      text: 'A dog is a type of domesticated animal.\n            Known for its loyalty and faithfulness,\n            it can be found as a welcome guest in many households across the world.'
    };
    return _this;
  }

  _createClass(ScheduleList, [{
    key: 'render',
    value: function render() {
      return _react2.default.createElement(
        'div',
        { className: _home2.default.scheduleContainer },
        _react2.default.createElement(
          _mxa.Tabs,
          { defaultActiveKey: '1' },
          _react2.default.createElement(
            _mxa.Tabs.TabPane,
            {
              styles: { marginRight: -24 },
              tab: _react2.default.createElement(_TabPaneHeader2.default, { headerText: '\u4EFB\u52A1\u63D0\u793A', headerIcon: 'maskRemind', unRead: 99, bgColor: '#e5550a' }),
              key: '1'
            },
            this.renderMaskReminder()
          ),
          _react2.default.createElement(
            _mxa.Tabs.TabPane,
            { tab: _react2.default.createElement(_TabPaneHeader2.default, { headerText: '\u63D0\u793A\u9875\u9762', headerIcon: 'notification', unRead: 9, bgColor: '#0068cd' }), key: '2' },
            this.renderMaskReminder()
          ),
          _react2.default.createElement(
            _mxa.Tabs.TabPane,
            { tab: _react2.default.createElement(_TabPaneHeader2.default, { headerText: '\u9884\u8B66\u9875\u9762', headerIcon: 'warn', unRead: 100, bgColor: '#0084e0' }), key: '3' },
            this.renderMaskReminder()
          ),
          _react2.default.createElement(
            _mxa.Tabs.TabPane,
            { tab: _react2.default.createElement(_TabPaneHeader2.default, { headerText: '\u5F81\u6C42\u610F\u89C1', headerIcon: 'advice', unRead: 0, bgColor: '#00aced' }), key: '4' },
            this.renderMaskReminder()
          ),
          _react2.default.createElement(
            _mxa.Tabs.TabPane,
            { tab: _react2.default.createElement(_TabPaneHeader2.default, { headerText: '\u91CD\u70B9\u4FE1\u606F\u94FE\u63A5', headerIcon: 'link', unRead: 17, bgColor: '#009ffd' }), key: '5' },
            this.renderMaskReminder()
          )
        )
      );
    }
  }]);

  return ScheduleList;
}(_react2.default.Component);

exports.default = ScheduleList;
//# sourceMappingURL=ScheduleList.js.map