'use strict';

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

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _class, _temp;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactImmutableProptypes = require('react-immutable-proptypes');

var _reactImmutableProptypes2 = _interopRequireDefault(_reactImmutableProptypes);

var _platform = require('platform');

var _platform2 = _interopRequireDefault(_platform);

var _ToggleDetails = require('@instructure/ui-toggle-details/lib/components/ToggleDetails');

var _ToggleDetails2 = _interopRequireDefault(_ToggleDetails);

var _Table = require('@instructure/ui-elements/lib/components/Table');

var _Table2 = _interopRequireDefault(_Table);

var _ScreenReaderContent = require('@instructure/ui-a11y/lib/components/ScreenReaderContent');

var _ScreenReaderContent2 = _interopRequireDefault(_ScreenReaderContent);

var _formatMessage = require('../../../common/format-message');

var _formatMessage2 = _interopRequireDefault(_formatMessage);

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

var SessionStartEvent = (_temp = _class = function (_Component) {
  (0, _inherits3.default)(SessionStartEvent, _Component);

  function SessionStartEvent() {
    (0, _classCallCheck3.default)(this, SessionStartEvent);
    return (0, _possibleConstructorReturn3.default)(this, (SessionStartEvent.__proto__ || Object.getPrototypeOf(SessionStartEvent)).apply(this, arguments));
  }

  (0, _createClass3.default)(SessionStartEvent, [{
    key: 'render',
    value: function render() {
      var event = this.props.event;

      var userPlatform = _platform2.default.parse(event.getIn(['eventData', 'userAgent']));

      return _react2.default.createElement(
        _ToggleDetails2.default,
        {
          summary: 'Systeemdetails vastgelegd'
        },
        _react2.default.createElement(
          _Table2.default,
          {
            caption: _react2.default.createElement(
              _ScreenReaderContent2.default,
              null,
              'Systeemdetails'
            )
          },
          _react2.default.createElement(
            'thead',
            null,
            _react2.default.createElement(
              'tr',
              null,
              _react2.default.createElement(
                'th',
                null,
                'kenmerk'
              ),
              _react2.default.createElement(
                'th',
                null,
                'waarde'
              )
            )
          ),
          _react2.default.createElement(
            'tbody',
            null,
            _react2.default.createElement(
              'tr',
              null,
              _react2.default.createElement(
                'td',
                null,
                'Browser'
              ),
              _react2.default.createElement(
                'td',
                null,
                userPlatform.name + ' ' + userPlatform.version
              )
            ),
            _react2.default.createElement(
              'tr',
              null,
              _react2.default.createElement(
                'td',
                null,
                'Besturingssysteem'
              ),
              _react2.default.createElement(
                'td',
                null,
                userPlatform.os.toString()
              )
            )
          )
        )
      );
    }
  }]);
  SessionStartEvent.displayName = 'SessionStartEvent'
  ;
  return SessionStartEvent;
}(_react.Component), _class.propTypes = {
  event: _reactImmutableProptypes2.default.record.isRequired
}, _temp);
exports.default = SessionStartEvent;