(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define(['exports', 'react', 'classnames', './px-alert-message.scss'], factory);
  } else if (typeof exports !== "undefined") {
    factory(exports, require('react'), require('classnames'), require('./px-alert-message.scss'));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports, global.react, global.classnames, global.pxAlertMessage);
    global.index = mod.exports;
  }
})(this, function (exports, _react, _classnames, _pxAlertMessage) {
  'use strict';

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

  var _react2 = _interopRequireDefault(_react);

  var _classnames2 = _interopRequireDefault(_classnames);

  var _pxAlertMessage2 = _interopRequireDefault(_pxAlertMessage);

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

  exports.default = function (_ref) {
    var messageTitle = _ref.messageTitle,
        message = _ref.message,
        _ref$action = _ref.action,
        action = _ref$action === undefined ? 'dismiss' : _ref$action,
        visible = _ref.visible,
        expanded = _ref.expanded,
        _ref$type = _ref.type,
        type = _ref$type === undefined ? 'information' : _ref$type,
        _ref$autoDismiss = _ref.autoDismiss,
        autoDismiss = _ref$autoDismiss === undefined ? 5000 : _ref$autoDismiss,
        _ref$language = _ref.language,
        language = _ref$language === undefined ? 'en' : _ref$language,
        children = _ref.children;


    var baseClasses = (0, _classnames2.default)('alert-message', { 'alert-message--visible': visible }, 'shadow-notification', 'flex', 'flex--left', 'flex--stretch');
    var severityClasses = (0, _classnames2.default)('severity', 'flex', 'flex--center', type);

    return _react2.default.createElement(
      'div',
      { className: 'px-alert-message' },
      _react2.default.createElement(
        'div',
        { className: baseClasses },
        _react2.default.createElement('div', { className: severityClasses }),
        _react2.default.createElement(
          'div',
          { className: 'message-column flex flex--middle' },
          _react2.default.createElement(
            'div',
            { className: 'message-container' },
            _react2.default.createElement(
              'div',
              { id: 'message', className: 'message' },
              _react2.default.createElement(
                'span',
                { className: 'title u-mr--' },
                messageTitle
              ),
              _react2.default.createElement(
                'span',
                null,
                message
              ),
              _react2.default.createElement(
                'div',
                null,
                children
              )
            )
          )
        ),
        _react2.default.createElement(
          'div',
          { className: 'action flex flex--middle flex--center' },
          action === 'dismiss' && _react2.default.createElement(
            'button',
            {
              onClick: function onClick(e) {
                undefined.close(e);
              },
              className: 'btn btn--bare dismiss' },
            _react2.default.createElement(
              'svg',
              { viewBox: '0 0 22 22', preserveAspectRatio: 'xMidYMid meet', focusable: 'false' },
              _react2.default.createElement(
                'g',
                null,
                _react2.default.createElement('path', { strokeMiterlimit: '10', d: 'M3 19L19 3M3 3l16 16' })
              )
            )
          ),
          action === 'acknowledge' && _react2.default.createElement(
            'button',
            { id: 'actionButton',
              onClick: function onClick(e) {
                undefined.close(e);
              },
              className: 'btn btn--tertiary' },
            'OK'
          )
        )
      )
    );
  };
});