import{j as t}from"./cm-1.0.63-CSIRHMXC.js";import{r as p}from"./redux-1.0.63-Df-eBzJn.js";import{B as x}from"./index-1.0.63-BbQj9wqD.js";import{l as u}from"./lib-1.0.63-DJZPtMem.js";import{A as d,a as f}from"./AlertTitle-1.0.63-B6QMQB-K.js";import{I as h}from"./iconBase-1.0.63-CFvHhC4t.js";import"./vendor-1.0.63-CN03Eozo.js";import"./loglevel-1.0.63-BZ7XahX3.js";import"./lodash-1.0.63-hMxolcpJ.js";import"./moment-1.0.63-C5S46NFB.js";import"./Typography-1.0.63-mecuj_Wl.js";import"./ButtonBase-1.0.63-CF10PFMS.js";import"./useEnhancedEffect-1.0.63-DnR0ZFqV.js";import"./createSvgIcon-1.0.63-DWL3J-DK.js";import"./Close-1.0.63-Dvbopfj5.js";const z=({severity:e,message:i,now:a,close:m,setClose:o})=>{u.debug(e,i);const[r,s]=p.useState(null);p.useEffect(()=>{s({severity:e,message:i})},[e,i,a]);const n=()=>{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:m!==!1&&t.jsx(h,{onClick:n,sx:{width:"30px",height:"30px"},children:t.jsx(x,{})}),children:[t.jsx(f,{children:c(r.severity.toString())}),r.message]})})};export{z as default};
