import{ao as f,ap as b,j as e,w as s,g as a,bV as h,I as k,b0 as _,bW as m,bq as w}from"./index-Csef3-wA.js";import{I as x}from"./Icon-o1TUwOIX.js";var l={},A=b;Object.defineProperty(l,"__esModule",{value:!0});var p=l.default=void 0,v=A(f()),C=e;p=l.default=(0,v.default)((0,C.jsx)("path",{d:"M19 6.41 17.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");const j=s((o,t,r)=>({root:{width:"100%",color:a.white,fontSize:14,fontWeight:600,borderRadius:8,paddingLeft:36,paddingRight:40,alignItems:"center",height:68,position:"relative",[o.breakpoints.only("sm")]:{paddingLeft:30,paddingRight:30},[o.breakpoints.only("xs")]:{paddingLeft:20,paddingRight:20},[o.breakpoints.down("md")]:{paddingTop:20,paddingBottom:20,minHeight:68,height:"auto","&:not(.action-close)":{flexWrap:"wrap"}}},icon:{opacity:1},message:{[o.breakpoints.down("md")]:{flex:1}},action:{[`.${r.root}:not(.action-close) &`]:{marginRight:0,[o.breakpoints.down("md")]:{paddingLeft:0,paddingTop:12,width:"100%"}}},standard:{"&.MuiAlert-colorError":{backgroundColor:"#FE4256",color:a.white},"&.MuiAlert-colorWarning":{backgroundColor:"#E5C513"},"&.MuiAlert-colorSuccess":{backgroundColor:"#46CB48"},"&.MuiAlert-colorInfo":{backgroundColor:"#1D59F9"}}}),"Alert")(h),I=k("div")(({theme:o})=>({display:"flex",alignItems:"center",gap:"12px",[o.breakpoints.down("md")]:{width:"100%",flexDirection:"column"}}),"Alert-ActionsWrapper"),y=s(o=>({root:{[o.breakpoints.down("md")]:{position:"absolute",top:12,right:8}}}),"Alert-ActionIconButton")(_),R=s(o=>({root:{height:40,padding:"8px 20px",borderRadius:20,backgroundColor:a.white,color:a.black,fontSize:16,lineHeight:"24px",fontWeight:400,"&:hover, &:active":{backgroundColor:a.white,opacity:.9},[o.breakpoints.down("md")]:{width:"100%"}}}),"Alert-ActionButton")(m),B={error:"circle_error_white",warning:"triangle_warning_white",success:"circle_check_white",info:"circle_info_white",error_snackbar:"circle_error_snackbar",warning_snackbar:"triangle_warning_snackbar",success_snackbar:"circle_check_snackbar",info_snackbar:"circle_info_snackbar"};function d(o,t){const{label:r,buttonClose:c,...n}=o;let i;return n.to?i={component:w,to:n.to,onClick:n.onClick}:i=n,c?e.jsx(y,{size:"small",color:"inherit",...n,children:e.jsx(p,{fontSize:"small"})}):e.jsx(R,{...i,children:r},t)}function S(o){if(o)return typeof o!="object"?o:Array.isArray(o)?e.jsx(I,{children:o.map((t,r)=>d(t,`Alert-action-${r.toString()}`))}):d(o)}function M({children:o,severity:t,onClose:r,action:c,snackbar:n,...i}){const u=S(c),g=B[n?`${t}_snackbar`:t];return e.jsx(j,{icon:e.jsx(x,{name:g,size:24}),severity:t,onClose:r,action:u,classes:{root:!c&&r?"action-close":""},...i,children:o})}export{M as A};