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