import e from"../../../../@babel/runtime/helpers/esm/objectWithoutProperties.js";import o from"../../../../@babel/runtime/helpers/esm/extends.js";import*as r from"react";import n from"../../../../prop-types/index.js";import t from"../../../../clsx/dist/clsx.m.js";import i from"../internal/svg-icons/SuccessOutlined.js";import a from"../internal/svg-icons/ReportProblemOutlined.js";import l from"../internal/svg-icons/ErrorOutline.js";import s from"../internal/svg-icons/InfoOutlined.js";import c from"../internal/svg-icons/Close.js";import m from"../../../core/esm/styles/withStyles.js";import{darken as p,lighten as d}from"../../../core/esm/styles/colorManipulator.js";import f from"../../../core/esm/Paper/Paper.js";import u from"../../../core/esm/utils/capitalize.js";import g from"../../../core/esm/IconButton/IconButton.js";var h=function(e){var r="light"===e.palette.type?p:d,n="light"===e.palette.type?d:p;return{root:o({},e.typography.body2,{borderRadius:e.shape.borderRadius,backgroundColor:"transparent",display:"flex",padding:"6px 16px"}),standardSuccess:{color:r(e.palette.success.main,.6),backgroundColor:n(e.palette.success.main,.9),"& $icon":{color:e.palette.success.main}},standardInfo:{color:r(e.palette.info.main,.6),backgroundColor:n(e.palette.info.main,.9),"& $icon":{color:e.palette.info.main}},standardWarning:{color:r(e.palette.warning.main,.6),backgroundColor:n(e.palette.warning.main,.9),"& $icon":{color:e.palette.warning.main}},standardError:{color:r(e.palette.error.main,.6),backgroundColor:n(e.palette.error.main,.9),"& $icon":{color:e.palette.error.main}},outlinedSuccess:{color:r(e.palette.success.main,.6),border:"1px solid ".concat(e.palette.success.main),"& $icon":{color:e.palette.success.main}},outlinedInfo:{color:r(e.palette.info.main,.6),border:"1px solid ".concat(e.palette.info.main),"& $icon":{color:e.palette.info.main}},outlinedWarning:{color:r(e.palette.warning.main,.6),border:"1px solid ".concat(e.palette.warning.main),"& $icon":{color:e.palette.warning.main}},outlinedError:{color:r(e.palette.error.main,.6),border:"1px solid ".concat(e.palette.error.main),"& $icon":{color:e.palette.error.main}},filledSuccess:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.success.main},filledInfo:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.info.main},filledWarning:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.warning.main},filledError:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.error.main},icon:{marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9},message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}},v={success:r.createElement(i,{fontSize:"inherit"}),warning:r.createElement(a,{fontSize:"inherit"}),error:r.createElement(l,{fontSize:"inherit"}),info:r.createElement(s,{fontSize:"inherit"})},y=r.createElement(c,{fontSize:"small"}),b=r.forwardRef((function(n,i){var a=n.action,l=n.children,s=n.classes,c=n.className,m=n.closeText,p=void 0===m?"Close":m,d=n.color,h=n.icon,b=n.iconMapping,x=void 0===b?v:b,E=n.onClose,j=n.role,C=void 0===j?"alert":j,w=n.severity,W=void 0===w?"success":w,S=n.variant,k=void 0===S?"standard":S,N=e(n,["action","children","classes","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"]);return r.createElement(f,o({role:C,square:!0,elevation:0,className:t(s.root,s["".concat(k).concat(u(d||W))],c),ref:i},N),!1!==h?r.createElement("div",{className:s.icon},h||x[W]||v[W]):null,r.createElement("div",{className:s.message},l),null!=a?r.createElement("div",{className:s.action},a):null,null==a&&E?r.createElement("div",{className:s.action},r.createElement(g,{size:"small","aria-label":p,title:p,color:"inherit",onClick:E},y)):null)}));"production"!==process.env.NODE_ENV&&(b.propTypes={action:n.node,children:n.node,classes:n.object,className:n.string,closeText:n.string,color:n.oneOf(["error","info","success","warning"]),icon:n.node,iconMapping:n.shape({error:n.node,info:n.node,success:n.node,warning:n.node}),onClose:n.func,role:n.string,severity:n.oneOf(["error","info","success","warning"]),variant:n.oneOf(["filled","outlined","standard"])});var x=m(h,{name:"MuiAlert"})(b);export default x;export{h as styles};
//# sourceMappingURL=Alert.js.map
