'use strict';

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _reactTestRenderer2 = _interopRequireDefault(_reactTestRenderer);

var _TextIcon = require('../TextIcon');

var _TextIcon2 = _interopRequireDefault(_TextIcon);

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

var _index2 = _interopRequireDefault(_index);

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

// eslint-disable-line import/no-extraneous-dependencies

/* eslint-disable max-len */
var Card = _index2.default.Card,
    Icon = _index2.default.Icon,
    SectionTitle = _index2.default.SectionTitle,
    SectionBody = _index2.default.SectionBody,
    Banner = _index2.default.Banner,
    SectionFooter = _index2.default.SectionFooter,
    Section = _index2.default.Section;


test('Cards renders correctly', function () {
  var tree = _reactTestRenderer2.default.create(_react2.default.createElement(
    'div',
    null,
    _react2.default.createElement(
      'p',
      null,
      'Items per row auto (max 4) : result 2'
    ),
    _react2.default.createElement(
      _index2.default,
      null,
      _react2.default.createElement(
        Card,
        null,
        _react2.default.createElement(Icon, { src: '/pic-pig.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionTitle,
            null,
            'Lorem ipsum dolor'
          ),
          _react2.default.createElement(
            SectionBody,
            { src: '/pic-pig.svg' },
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet, euismod in neque. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl, ac efficitur metus eleifend et.'
          ),
          _react2.default.createElement(
            SectionFooter,
            null,
            'Lorem ipsum dolor sit amet Lorem ipsum dolor sit.'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        { colorVariant: 'white' },
        _react2.default.createElement(Banner, { src: 'http://media.rtl.fr/cache/rGFoG3N32J0OTqKOhyjU8Q/880v587-0/online/image/2017/0412/7788094382_un-ecureuil-curieux-plonge-sa-tete-dans-une-fleur.jpg', ratio: 4 / 3 }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionTitle,
            null,
            'Consectetur adipiscing elit'
          ),
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet, euismod in neque. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl, ac efficitur metus eleifend et. Sed sit amet metus elit. Cras quis ullamcorper dolor, vel congue justo. Morbi consectetur orci non leo congue, ut tincidunt arcu dapibus.'
          ),
          _react2.default.createElement(
            SectionFooter,
            null,
            '2 weeks 1 day'
          )
        )
      )
    ),
    _react2.default.createElement(
      'p',
      null,
      'Items per row auto (max 4) : result 4'
    ),
    _react2.default.createElement(
      _index2.default,
      null,
      _react2.default.createElement(
        Card,
        null,
        _react2.default.createElement(Icon, { src: '/pic-battery.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionTitle,
            null,
            'Lorem ipsum dolor'
          ),
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        { colorVariant: 'white' },
        _react2.default.createElement(Icon, { src: '/pic-pig.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionTitle,
            null,
            'Proin sit amet facilisis'
          ),
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        null,
        _react2.default.createElement(Banner, { src: 'https://www.chassimages.com/mag/wp-content/uploads/2017/03/ImageJour2903.jpg', ratio: 4 / 3 }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionTitle,
            null,
            'Lorem ipsum dolor'
          ),
          _react2.default.createElement(
            SectionBody,
            null,
            'dignissim sit amet, euismod in neque. Proin sit amet facilisis odio'
          ),
          _react2.default.createElement(
            SectionFooter,
            null,
            'consectetur adipiscing elit'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        null,
        _react2.default.createElement(Icon, { src: '/pic-battery.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionTitle,
            null,
            'Lorem ipsum dolor'
          ),
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl'
          )
        )
      )
    ),
    _react2.default.createElement(
      _index2.default,
      { horizontal: true },
      _react2.default.createElement(
        Card,
        { colorVariant: 'white' },
        _react2.default.createElement(Banner, { width: '300px', type: 'image', src: 'http://www.gratuit-en-ligne.com/telecharger-gratuit-en-ligne/telecharger-image-wallpaper-gratuit/image-wallpaper-animaux/img/images/image-wallpaper-animaux-autruche.jpg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionTitle,
            null,
            'LOREM IPSUM DOLOR'
          ),
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet'
          )
        ),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionTitle,
            null,
            'LOREM IPSUM DOLOR'
          ),
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        null,
        _react2.default.createElement(Banner, { width: '50%', ratio: 4 / 3, type: 'image', src: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSiClD4gHJhCmAW-Kjz6XnTUooJW44moQ9sTondD2J9IvCPH8yNeQ' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionTitle,
            null,
            'LOREM IPSUM DOLOR'
          ),
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. consectetur adipiscing elit. consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet'
          ),
          _react2.default.createElement(
            SectionFooter,
            null,
            _react2.default.createElement(
              _TextIcon2.default,
              { name: 'doc', size: 'sm' },
              '1 month 1 week'
            )
          )
        )
      )
    ),
    _react2.default.createElement(
      _index2.default,
      { itemsPerRow: 3 },
      _react2.default.createElement(
        Card,
        { title: 'hello', icon: '/pic-battery.svg' },
        _react2.default.createElement(Icon, { src: '/pic-pig.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet, euismod in neque. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        { title: 'hello world', icon: '/pic-pig.svg' },
        _react2.default.createElement(Icon, { src: '/pic-battery.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet, euismod in neque. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        { title: 'hello le monde', icon: '/pic-pig.svg' },
        _react2.default.createElement(Icon, { src: '/pic-pig.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet, euismod in neque. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl, ac efficitur metus eleifend et.'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        { title: 'hello le monde', icon: '/pic-pig.svg' },
        _react2.default.createElement(Icon, { src: '/pic-battery.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet, euismod in neque. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        { title: 'hello world', icon: '/pic-pig.svg' },
        _react2.default.createElement(Icon, { src: '/pic-pig.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet, euismod in neque. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl,'
          )
        )
      ),
      _react2.default.createElement(
        Card,
        { title: 'hello le monde', icon: '/pic-pig.svg' },
        _react2.default.createElement(Icon, { src: '/pic-battery.svg' }),
        _react2.default.createElement(
          Section,
          null,
          _react2.default.createElement(
            SectionBody,
            null,
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dolor ipsum, auctor non dignissim sit amet, euismod in neque. Proin sit amet facilisis odio, auctor condimentum est. Sed malesuada ipsum nisl, ac efficitur metus eleifend et.'
          )
        )
      )
    )
  )).toJSON();
  expect(tree).toMatchSnapshot();
});