'use strict';

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

var _reactToastr = require('react-toastr');

var _path = require('path');

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

const ToastMessageFactory = _react2.default.createFactory(_reactToastr.ToastMessage.animation);

class Toastr extends _react2.default.Component {
  constructor(...args) {
    var _temp;

    return _temp = super(...args), this.componentDidMount = () => {
      window.toastInitializer(this.container);
    }, _temp;
  }

  render() {
    return _react2.default.createElement(
      'div',
      null,
      _react2.default.createElement('link', { rel: 'stylesheet', href: (0, _path.join)(__dirname, 'assets', 'toast-animate.css') }),
      _react2.default.createElement('link', { rel: 'stylesheet', href: (0, _path.join)(__dirname, 'assets', 'toast.css') }),
      _react2.default.createElement(_reactToastr.ToastContainer, { ref: ref => {
          this.container = ref;
        },
        toastMessageFactory: ToastMessageFactory,
        className: 'toast-poi' })
    );
  }
}

exports.Toastr = Toastr;