'use strict';

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

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _toast = require('views/env-parts/toast');

require('./assets/toast-animate.css');

require('./assets/toast.css');

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

const ToastMessageFactory = _react2.default.createFactory(_reactToastr.ToastMessageAnimated);

class Toastr extends _react.PureComponent {
  constructor(...args) {
    var _temp;

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

  render() {
    return _react2.default.createElement(_reactToastr.ToastContainer, { ref: ref => {
        this.container = ref;
      },
      toastMessageFactory: ToastMessageFactory,
      className: 'toast-poi' });
  }
}

exports.Toastr = Toastr;