'use strict';

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactTestRenderer = require('react-test-renderer');

var _reactTestRenderer2 = _interopRequireDefault(_reactTestRenderer);

var _index = require('./index');

var _index2 = _interopRequireDefault(_index);

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

var Step = _index2.default.Step,
    Steps = _index2.default.Steps,
    StepperContent = _index2.default.StepperContent; // eslint-disable-line import/no-extraneous-dependencies

test('Stepper renders correctly', function () {
  var tree = _reactTestRenderer2.default.create(_react2.default.createElement(
    'div',
    null,
    _react2.default.createElement(
      _index2.default,
      { size: 'md' },
      _react2.default.createElement(
        Steps,
        null,
        _react2.default.createElement(
          Step,
          { icon: 'sigfox', value: { title: 'What is Sigfox' }, enabled: true },
          'What is Sigfox'
        ),
        _react2.default.createElement(
          Step,
          { icon: 'study', value: { title: 'Qualification' }, enabled: true },
          'Qualification'
        ),
        _react2.default.createElement(
          Step,
          { icon: 'start', value: { title: 'Prototyping' }, enabled: true },
          'Prototyping'
        ),
        _react2.default.createElement(
          Step,
          { icon: 'development', value: { title: 'Development' }, enabled: true },
          'Development'
        ),
        _react2.default.createElement(
          Step,
          { icon: 'certification', value: { title: 'Certification' }, enabled: true },
          'Certification'
        ),
        _react2.default.createElement(
          Step,
          { icon: 'industrialization', value: { title: 'Industrialization' }, enabled: true },
          'Industrialization'
        )
      ),
      _react2.default.createElement(
        StepperContent,
        null,
        function (value) {
          var _ref = value || {},
              title = _ref.title;

          return _react2.default.createElement(
            'div',
            null,
            _react2.default.createElement(
              'h1',
              null,
              title
            ),
            _react2.default.createElement(
              'p',
              null,
              'Lorem ipsum'
            )
          );
        }
      )
    ),
    _react2.default.createElement(
      _index2.default,
      { size: 'sm', withBorder: true },
      _react2.default.createElement(
        Steps,
        null,
        _react2.default.createElement(
          Step,
          { value: { title: 'What is Sigfox' }, enabled: true },
          'What is Sigfox'
        ),
        _react2.default.createElement(
          Step,
          { value: { title: 'Qualification' }, enabled: true },
          'Qualification'
        ),
        _react2.default.createElement(
          Step,
          { value: { title: 'Prototyping' }, enabled: true },
          'Prototyping'
        ),
        _react2.default.createElement(
          Step,
          { value: { title: 'Development' }, enabled: true, selected: true },
          'Development'
        ),
        _react2.default.createElement(
          Step,
          { value: { title: 'Certification' } },
          'Certification'
        ),
        _react2.default.createElement(
          Step,
          { value: { title: 'Industrialisation' } },
          'Industrialisation'
        )
      ),
      _react2.default.createElement(
        StepperContent,
        null,
        function (value) {
          var _ref2 = value || {},
              title = _ref2.title;

          return _react2.default.createElement(
            'div',
            null,
            _react2.default.createElement(
              'h1',
              null,
              title
            ),
            _react2.default.createElement(
              'p',
              null,
              'Lorem ipsum'
            )
          );
        }
      )
    ),
    _react2.default.createElement(
      Steps,
      { size: 'sm' },
      _react2.default.createElement(
        Step,
        { icon: 'sigfox', value: { title: 'What is Sigfox' }, enabled: true },
        'What is Sigfox'
      ),
      _react2.default.createElement(
        Step,
        { icon: 'study', value: { title: 'Qualification' }, enabled: true },
        'Qualification'
      ),
      _react2.default.createElement(
        Step,
        { icon: 'start', value: { title: 'Prototyping' }, enabled: true },
        'Prototyping'
      )
    ),
    _react2.default.createElement(
      Steps,
      { size: 'sm' },
      _react2.default.createElement(
        Step,
        { value: { title: 'What is Sigfox' }, enabled: true },
        'What is Sigfox'
      ),
      _react2.default.createElement(
        Step,
        { value: { title: 'Qualification' }, enabled: true },
        'Qualification'
      ),
      _react2.default.createElement(
        Step,
        { value: { title: 'Prototyping' }, enabled: true },
        'Prototyping'
      )
    ),
    _react2.default.createElement(
      Steps,
      { size: 'md' },
      _react2.default.createElement(
        Step,
        { icon: 'sigfox', value: { title: 'What is Sigfox' }, enabled: true },
        'What is Sigfox'
      ),
      _react2.default.createElement(
        Step,
        { icon: 'study', value: { title: 'Qualification' }, enabled: true },
        'Qualification'
      ),
      _react2.default.createElement(
        Step,
        { icon: 'start', value: { title: 'Prototyping' }, enabled: true },
        'Prototyping'
      )
    ),
    _react2.default.createElement(
      Steps,
      { size: 'lg' },
      _react2.default.createElement(
        Step,
        { icon: 'sigfox', value: { title: 'What is Sigfox' }, enabled: true },
        'What is Sigfox'
      ),
      _react2.default.createElement(
        Step,
        { icon: 'study', value: { title: 'Qualification' }, enabled: true },
        'Qualification'
      ),
      _react2.default.createElement(
        Step,
        { icon: 'start', value: { title: 'Prototyping' }, enabled: true },
        'Prototyping'
      )
    )
  )).toJSON();
  expect(tree).toMatchSnapshot();
});