"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/slicedToArray"),n=require("react/jsx-runtime"),i=require("react"),o=require("uuid"),c=require("./Notifications.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=u(e),a=u(t),s=u(r);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){f.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}exports.DEFAULT_AUTO_HIDE_DURATION=3e3,exports.NotificationsContainer=function(){var e=i.useState([]),t=s.default(e,2),r=t[0],u=t[1],f=function(e){u((function(t){return[].concat(a.default(t),[e])}))},l=function(e){u((function(t){return t.filter((function(t){return t.id!==e}))}))},p=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={info:"Info",error:"Error",warning:"Warning",success:"Success"},i=b({autoHideDuration:3e3,content:t||n[e]||"info",id:o.v4(),variant:e},r);return f(i),i.id},O=function(e,t){return p("success",e,t)},d=function(e,t){return p("error",e,t)},y=function(e,t){return p("warning",e,t)},j=function(e,t){return p("info",e,t)},w=function(e,t){return p("info",e,t)};return i.useEffect((function(){window[Symbol.for("notificationToasts")]={createNotification:f,removeNotification:l,showErrorNotification:d,showInfoNotification:j,showNeutralNotification:w,showSuccessNotification:O,showWarningNotification:y}}),[]),n.jsx(c.Notifications,{notifications:r,removeNotification:l})};
//# sourceMappingURL=NotificationsContainer.js.map
