import{j as t}from"./tanstack-1.0.74-aU0azVkW.js";import{r as p}from"./redux-1.0.74-D8bIc6ki.js";import{B as x}from"./index-1.0.74-C9JunOsO.js";import{l as u}from"./lib-1.0.74-B5IEqfHg.js";import{A as d,a as f}from"./AlertTitle-1.0.74-BmkdSyE6.js";import{I as h}from"./iconBase-1.0.74-Cs0vntJu.js";import"./vendor-1.0.74-CN03Eozo.js";import"./utils-1.0.74-7xWhx9mc.js";import"./CircularProgress-1.0.74-QfwfRJ7i.js";import"./ButtonBase-1.0.74-W6tAH7AI.js";import"./Typography-1.0.74-B4mhsevh.js";import"./useEnhancedEffect-1.0.74-B56M26dS.js";import"./createSvgIcon-1.0.74-Cw_ZFbxi.js";import"./Close-1.0.74-Ce0z5IFm.js";const y=({severity:e,message:i,now:a,close:n,setClose:o})=>{u.debug(e,i);const[r,s]=p.useState(null);p.useEffect(()=>{s({severity:e,message:i})},[e,i,a]);const m=()=>{s(null),o!==void 0&&o()},c=l=>l.charAt(0).toUpperCase()+l.slice(1);return t.jsx(t.Fragment,{children:r!==null&&t.jsxs(d,{className:"pp-alert",severity:r.severity,sx:{borderRadius:"4px"},action:n!==!1&&t.jsx(h,{onClick:m,sx:{width:"30px",height:"30px"},children:t.jsx(x,{})}),children:[t.jsx(f,{children:c(r.severity.toString())}),r.message]})})};export{y as default};
