"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require('./../../ext-esm/tslib/tslib.es6.js'),n=require("react/jsx-runtime"),t=require("react"),r=require("uuid"),o=require("./Notifications.js");exports.NotificationsContainer=function(){var e=t.useState([]),u=e[0],c=e[1],a=function(n){c((function(t){return i.__spreadArray(i.__spreadArray([],t,!0),[n],!1)}))},s=function(i){c((function(n){return n.filter((function(n){return n.id!==i}))}))},f=function(n,t,o){void 0===o&&(o={});var e=i.__assign({autoHideDuration:3e3,content:t||{info:"Info",error:"Error",warning:"Warning",success:"Success",neutral:"Neutral"}[n]||"info",id:r.v4(),variant:n},o);return a(e),e.id},d=function(i,n){return f("success",i,n)},N=function(i,n){return f("error",i,n)},l=function(i,n){return f("warning",i,n)},v=function(i,n){return f("info",i,n)},w=function(i,n){return f("neutral",i,n)};return t.useEffect((function(){window[Symbol.for("notificationToasts")]={createNotification:a,removeNotification:s,showErrorNotification:N,showInfoNotification:v,showNeutralNotification:w,showSuccessNotification:d,showWarningNotification:l}}),[]),n.jsx(o.Notifications,{notifications:u,removeNotification:s})};
