import{g as V,f as D,i as c,j as e,r as Z,b as q,D as a,c as G,I as J,E as f,d as K,s as u,P as Q,m as X,F as v}from"./render-D1ZqzUbP.js";function Y(t){return V("MuiAlert",t)}const m=D("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),_=c(e.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),tt=c(e.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),ot=c(e.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),et=c(e.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),st=c(e.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),lt=t=>{const{variant:s,color:l,severity:o,classes:i}=t,g={root:["root",`color${f(l||o)}`,`${s}${f(l||o)}`,`${s}`],icon:["icon"],message:["message"],action:["action"]};return K(g,Y,i)},rt=u(Q,{name:"MuiAlert",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:l}=t;return[s.root,s[l.variant],s[`${l.variant}${f(l.color||l.severity)}`]]}})(X(({theme:t})=>{const s=t.palette.mode==="light"?t.darken:t.lighten,l=t.palette.mode==="light"?t.lighten:t.darken;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(v(["light"])).map(([o])=>({props:{colorSeverity:o,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${o}Color`]:s(t.palette[o].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${o}StandardBg`]:l(t.palette[o].light,.9),[`& .${m.icon}`]:t.vars?{color:t.vars.palette.Alert[`${o}IconColor`]}:{color:t.palette[o].main}}})),...Object.entries(t.palette).filter(v(["light"])).map(([o])=>({props:{colorSeverity:o,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${o}Color`]:s(t.palette[o].light,.6),border:`1px solid ${(t.vars||t).palette[o].light}`,[`& .${m.icon}`]:t.vars?{color:t.vars.palette.Alert[`${o}IconColor`]}:{color:t.palette[o].main}}})),...Object.entries(t.palette).filter(v(["dark"])).map(([o])=>({props:{colorSeverity:o,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${o}FilledColor`],backgroundColor:t.vars.palette.Alert[`${o}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[o].dark:t.palette[o].main,color:t.palette.getContrastText(t.palette[o].main)}}}))]}})),nt=u("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),at=u("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),it=u("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),j={success:e.jsx(_,{fontSize:"inherit"}),warning:e.jsx(tt,{fontSize:"inherit"}),error:e.jsx(ot,{fontSize:"inherit"}),info:e.jsx(et,{fontSize:"inherit"})},pt=Z.forwardRef(function(s,l){const o=q({props:s,name:"MuiAlert"}),{action:i,children:g,className:P,closeText:x="Close",color:A,components:C={},componentsProps:z={},icon:S,iconMapping:$=j,onClose:y,role:L="alert",severity:p="success",slotProps:b={},slots:k={},variant:h="standard",...B}=o,r={...o,color:A,severity:p,variant:h,colorSeverity:A||p},d=lt(r),n={slots:{closeButton:C.CloseButton,closeIcon:C.CloseIcon,...k},slotProps:{...z,...b}},[R,T]=a("root",{ref:l,shouldForwardComponentProp:!0,className:G(d.root,P),elementType:rt,externalForwardedProps:{...n,...B},ownerState:r,additionalProps:{role:L,elevation:0}}),[w,E]=a("icon",{className:d.icon,elementType:nt,externalForwardedProps:n,ownerState:r}),[F,O]=a("message",{className:d.message,elementType:at,externalForwardedProps:n,ownerState:r}),[I,M]=a("action",{className:d.action,elementType:it,externalForwardedProps:n,ownerState:r}),[W,H]=a("closeButton",{elementType:J,externalForwardedProps:n,ownerState:r}),[N,U]=a("closeIcon",{elementType:st,externalForwardedProps:n,ownerState:r});return e.jsxs(R,{...T,children:[S!==!1?e.jsx(w,{...E,children:S||$[p]||j[p]}):null,e.jsx(F,{...O,children:g}),i!=null?e.jsx(I,{...M,children:i}):null,i==null&&y?e.jsx(I,{...M,children:e.jsx(W,{size:"small","aria-label":x,title:x,color:"inherit",onClick:y,...H,children:e.jsx(N,{fontSize:"small",...U})})}):null]})});export{pt as A};
//# sourceMappingURL=Alert-M7jUzTjE.js.map
