import{ak as g,al as d,r as i,an as x,ap as h,j as a,ah as T,am as y,as as C,at as j,h as A,U as M}from"./vendor-ClLR6ncd.js";import{aL as f}from"./index-OtVJl4GC.js";function E(s){return g("MuiAlertTitle",s)}d("MuiAlertTitle",["root"]);const S=["className"],v=s=>{const{classes:t}=s;return C({root:["root"]},E,t)},w=j(A,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(s,t)=>t.root})(({theme:s})=>({fontWeight:s.typography.fontWeightMedium,marginTop:-2})),R=i.forwardRef(function(t,o){const e=x({props:t,name:"MuiAlertTitle"}),{className:r}=e,c=h(e,S),n=e,l=v(n);return a.jsx(w,T({gutterBottom:!0,component:"div",ownerState:n,ref:o,className:y(l.root,r)},c))});function p({message:s,color:t,messageKind:o,reset:e,timeout:r,containerSx:c}){const[n,l]=i.useState(!1),u=i.useCallback(()=>{e?e():l(!0)},[e,l]);return i.useEffect(()=>{if(r){const m=setTimeout(()=>{u()},r);return()=>{clearTimeout(m)}}},[u,r]),!s||n?null:a.jsxs(M,{sx:{whiteSpace:"pre-wrap",alignSelf:"center",...c},onClose:e?u:void 0,severity:t,children:[a.jsxs(R,{children:[o,":"]}),s]})}function k({error:s,resetError:t,timeout:o,containerSx:e}){return a.jsx(p,{message:f(s)?"Cancelled query":(s==null?void 0:s.message)||s,reset:t,timeout:o,messageKind:"Error",color:f(s)?"warning":"error",containerSx:e})}function I(s){return a.jsx(p,{messageKind:"Success",color:"success",...s})}function K(s){return a.jsx(p,{messageKind:"Information",color:"info",...s})}export{k as E,K as I,I as S};
