'use strict';

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
var React = require('react');
var classnames = require('classnames');
var jsxRuntime = require('react/jsx-runtime');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWithoutProperties);
var classnames__default = /*#__PURE__*/_interopDefault(classnames);

var _excluded = ["icon", "style", "className", "children"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var STYLES = {
  info: "info",
  warning: "warning",
  danger: "danger",
  success: "success"
};
var Callout = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
  var _ref$icon = _ref.icon,
    icon = _ref$icon === void 0 ? null : _ref$icon,
    _ref$style = _ref.style,
    style = _ref$style === void 0 ? STYLES.info : _ref$style,
    _ref$className = _ref.className,
    className = _ref$className === void 0 ? "" : _ref$className,
    children = _ref.children,
    otherProps = _objectWithoutProperties__default.default(_ref, _excluded);
  var Icon = icon;
  return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
    ref: ref,
    "data-testid": "callout-element",
    className: classnames__default.default("neeto-ui-callout", _defineProperty__default.default({
      "neeto-ui-callout--info": style === STYLES.info,
      "neeto-ui-callout--warning": style === STYLES.warning,
      "neeto-ui-callout--danger": style === STYLES.danger,
      "neeto-ui-callout--success": style === STYLES.success
    }, className, className))
  }, otherProps), {}, {
    children: [icon && /*#__PURE__*/jsxRuntime.jsx("div", {
      className: "neeto-ui-callout__icon",
      "data-testid": "callout-icon",
      children: /*#__PURE__*/jsxRuntime.jsx(Icon, {})
    }), children]
  }));
});
Callout.displayName = "Callout";

module.exports = Callout;
//# sourceMappingURL=Callout.js.map
