'use strict';

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

var _lodash = require('lodash');

var _lodash2 = _interopRequireDefault(_lodash);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

var _infoboxLogo = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjIzcHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDIzIDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCAzLjguMyAoMjk4MDIpIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPgogICAgPHRpdGxlPmljb24taW5mb2JveDwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJBcnRpY2xlIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iVG9waWMt4oCTLU1vYmlsZS1Qb3J0cmFpdCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE0OS4wMDAwMDAsIC03MjU2LjAwMDAwMCkiPgogICAgICAgICAgICA8ZyBpZD0iSW5mb2JveCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDcyNTUuOTEzMDQzKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iTG9nby1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNDkuMDAwMDAwLCAwLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnIGlkPSJpY29uLWluZm9ib3giPgogICAgICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUmVjdGFuZ2xlLTEiIGZpbGw9IiNFNjAwMTIiIHBvaW50cz0iMCAwLjEwNDQ2ODg4OSAxMy43MzU0NDk3IDYuNjA1NDQyMTggMTMuNzM1NDQ5NyAxNy4zOTQ1NTc4IDAgMjMuODk1NjE5NyI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgICAgICAgICA8cG9seWdvbiBpZD0iUmVjdGFuZ2xlLTIiIGZpbGw9IiNDNzAwMEEiIHBvaW50cz0iMTMuNzM1NDQ5NyA2LjYwNTQ0MjE4IDIyLjQ3NjE5MDUgNC4zNTkyOTY2MSAyMi40NzYxOTA1IDE5LjY1NTEyNjYgMTMuNzM1NDQ5NyAxNy4zOTQ1NTc4Ij48L3BvbHlnb24+CiAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=";

var _infoboxLogo2 = _interopRequireDefault(_infoboxLogo);

var _InfoBox = {
  "infobox-container": "InfoBox__infobox-container___1S_E4",
  "infobox-text": "InfoBox__infobox-text___k0TYS",
  "mobile": "InfoBox__mobile___1xg7_"
};

var _InfoBox2 = _interopRequireDefault(_InfoBox);

var _BlockAlignmentWrapper = require('./BlockAlignmentWrapper');

var _BlockAlignmentWrapper2 = _interopRequireDefault(_BlockAlignmentWrapper);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

// eslint-disable-next-line

var InfoBox = exports.InfoBox = function InfoBox(_ref) {
  var content = _ref.content;
  var device = _ref.device;

  var infoBox = _lodash2.default.get(content, [0], {});

  return _react2.default.createElement(
    'div',
    { className: (0, _classnames2.default)(_InfoBox2.default['infobox-container'], _defineProperty({}, _InfoBox2.default['mobile'], device === 'mobile' ? true : false)) },
    _react2.default.createElement('img', { src: _infoboxLogo2.default }),
    _react2.default.createElement(
      'div',
      { className: _InfoBox2.default['infobox-text'] },
      _react2.default.createElement(
        'h4',
        { className: 'text-center' },
        infoBox.title
      ),
      _react2.default.createElement('div', { className: 'text-justify', dangerouslySetInnerHTML: { __html: infoBox.body } })
    )
  );
};

var AlignedInfoBox = exports.AlignedInfoBox = (0, _BlockAlignmentWrapper2.default)(InfoBox);