import{cH as H,cG as N,j as s,f as p,P as T,cI as g,cJ as V,r as F,cK as U,cV as I,I as Z,cL as D,cM as G,dv as y,du as M,cR as u}from"./index-4dfc510b.js";import{c as i}from"./Grow-a7315f12.js";function J(t){return H("MuiAlert",t)}const K=N("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=i(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"),Q=i(s.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),X=i(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"),Y=i(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"),_=i(s.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"}),"Close"),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 G(d,J,a)},et=p(T,{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)}`]]}})(V(({theme:t})=>{const o=t.palette.mode==="light"?y:M,r=t.palette.mode==="light"?M:y;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=p("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,o)=>o.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),st=p("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,o)=>o.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),j=p("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(Q,{fontSize:"inherit"}),error:s.jsx(X,{fontSize:"inherit"}),info:s.jsx(Y,{fontSize:"inherit"})},rt=F.forwardRef(function(o,r){const e=U({props:o,name:"MuiAlert"}),{action:a,children:d,className:z,closeText:v="Close",color:f,components:C={},componentsProps:L={},icon:x,iconMapping:h=$,onClose:A,role:R="alert",severity:c="success",slotProps:b={},slots:P={},variant:w="standard",...O}=e,l={...e,color:f,severity:c,variant:w,colorSeverity:f||c},n=tt(l),S={slots:{closeButton:C.CloseButton,closeIcon:C.CloseIcon,...P},slotProps:{...L,...b}},[k,B]=I("closeButton",{elementType:Z,externalForwardedProps:S,ownerState:l}),[E,W]=I("closeIcon",{elementType:_,externalForwardedProps:S,ownerState:l});return s.jsxs(et,{role:R,elevation:0,ownerState:l,className:D(n.root,z),ref:r,...O,children:[x!==!1?s.jsx(ot,{ownerState:l,className:n.icon,children:x||h[c]||$[c]}):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]})}),nt=rt;export{nt as A};
