import{m as N,n as F,j as s,f as c,P as H,o as g,q as T,r as U,t as V,x as m,I as Z,v as q,w as D,dG as I,dF as y,cW as u}from"./index-7b9530f9.js";import{c as p}from"./Grow-ac96e569.js";import{C as G}from"./Close-55b04990.js";function J(t){return N("MuiAlert",t)}const K=F("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),M=K,Q=p(s.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"}),"SuccessOutlined"),X=p(s.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Y=p(s.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"}),"ErrorOutline"),_=p(s.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"}),"InfoOutlined"),tt=t=>{const{variant:o,color:r,severity:e,classes:a}=t,d={root:["root",`color${g(r||e)}`,`${o}${g(r||e)}`,`${o}`],icon:["icon"],message:["message"],action:["action"]};return D(d,J,a)},et=c(H,{name:"MuiAlert",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:r}=t;return[o.root,o[r.variant],o[`${r.variant}${g(r.color||r.severity)}`]]}})(T(({theme:t})=>{const o=t.palette.mode==="light"?I:y,r=t.palette.mode==="light"?y:I;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(u(["light"])).map(([e])=>({props:{colorSeverity:e,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${e}Color`]:o(t.palette[e].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${e}StandardBg`]:r(t.palette[e].light,.9),[`& .${M.icon}`]:t.vars?{color:t.vars.palette.Alert[`${e}IconColor`]}:{color:t.palette[e].main}}})),...Object.entries(t.palette).filter(u(["light"])).map(([e])=>({props:{colorSeverity:e,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${e}Color`]:o(t.palette[e].light,.6),border:`1px solid ${(t.vars||t).palette[e].light}`,[`& .${M.icon}`]:t.vars?{color:t.vars.palette.Alert[`${e}IconColor`]}:{color:t.palette[e].main}}})),...Object.entries(t.palette).filter(u(["dark"])).map(([e])=>({props:{colorSeverity:e,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${e}FilledColor`],backgroundColor:t.vars.palette.Alert[`${e}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[e].dark:t.palette[e].main,color:t.palette.getContrastText(t.palette[e].main)}}}))]}})),ot=c("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,o)=>o.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),st=c("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,o)=>o.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),j=c("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,o)=>o.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),$={success:s.jsx(Q,{fontSize:"inherit"}),warning:s.jsx(X,{fontSize:"inherit"}),error:s.jsx(Y,{fontSize:"inherit"}),info:s.jsx(_,{fontSize:"inherit"})},rt=U.forwardRef(function(o,r){const e=V({props:o,name:"MuiAlert"}),{action:a,children:d,className:z,closeText:v="Close",color:f,components:C={},componentsProps:b={},icon:x,iconMapping:h=$,onClose:A,role:w="alert",severity:i="success",slotProps:L={},slots:P={},variant:R="standard",...O}=e,l={...e,color:f,severity:i,variant:R,colorSeverity:f||i},n=tt(l),S={slots:{closeButton:C.CloseButton,closeIcon:C.CloseIcon,...P},slotProps:{...b,...L}},[k,B]=m("closeButton",{elementType:Z,externalForwardedProps:S,ownerState:l}),[E,W]=m("closeIcon",{elementType:G,externalForwardedProps:S,ownerState:l});return s.jsxs(et,{role:w,elevation:0,ownerState:l,className:q(n.root,z),ref:r,...O,children:[x!==!1?s.jsx(ot,{ownerState:l,className:n.icon,children:x||h[i]||$[i]}):null,s.jsx(st,{ownerState:l,className:n.message,children:d}),a!=null?s.jsx(j,{ownerState:l,className:n.action,children:a}):null,a==null&&A?s.jsx(j,{ownerState:l,className:n.action,children:s.jsx(k,{size:"small","aria-label":v,title:v,color:"inherit",onClick:A,...B,children:s.jsx(E,{fontSize:"small",...W})})}):null]})}),it=rt;export{it as A};
