'use strict';

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

var _mobxReact = require('mobx-react');

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _events = require('../lib/events');

var _events2 = _interopRequireDefault(_events);

var _controls = require('./controls');

var _controls2 = _interopRequireDefault(_controls);

var _stats = require('./stats');

var _stats2 = _interopRequireDefault(_stats);

var _tooltip = require('../tooltip/tooltip');

var _tooltip2 = _interopRequireDefault(_tooltip);

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

var Header = (0, _mobxReact.observer)(function (_ref) {
  var appState = _ref.appState;
  var events = _ref.events;
  var statsStore = _ref.statsStore;
  return _react2.default.createElement(
    'header',
    null,
    _react2.default.createElement(
      _tooltip2.default,
      { placement: 'bottom', title: 'View All Tests' },
      _react2.default.createElement(
        'button',
        { className: 'focus-tests', onClick: function onClick() {
            return events.emit('focus:tests');
          } },
        _react2.default.createElement('i', { className: 'fa fa-chevron-left' }),
        _react2.default.createElement(
          'span',
          null,
          'Tests'
        )
      )
    ),
    _react2.default.createElement(_stats2.default, { stats: statsStore }),
    _react2.default.createElement(_controls2.default, { appState: appState })
  );
});

Header.defaultProps = {
  events: _events2.default
};

exports.default = Header;
module.exports = exports['default'];