"use strict";var e=require("prop-types"),t=require("@material-ui/core"),i=require("react-router-dom"),r=require("@material-ui/icons/Timeline"),a=require("../../../constants/alerts.js"),n=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(e),s=o(r),d=t.makeStyles((function(e){return{alertContanier:{display:"inline-block",width:"calc(100% - 35px)"},timlineIconRoot:{verticalAlign:"bottom",marginRight:15},timelineText:{color:e.palette.grey[400]},item:{color:"#fff","&:hover":{textDecoration:"underline"}}}})),u=function(e){var r=e.feedItem,o=e.isCorvaV3FeaturesEnabled,l=e.onFeedItemClick,u=d(),c=r.context.alert,m=c.id,p=c.name,f=c.description,v=c.decision_path;return n.jsx("div",{children:n.jsxs("div",{className:u.alertContanier,children:[n.jsx(t.Typography,{variant:"body1",children:n.jsx(i.Link,{className:u.item,to:"/alerts/".concat(m,"/"),onClick:function(e){if(l)return e.preventDefault(),e.stopPropagation(),void l(r);o&&(e.preventDefault(),localStorage.setItem(a.OPEN_ALERT_DETAILS_ID_STORAGE_KEY,m))},children:p})}),n.jsx(t.Typography,{variant:"body1",gutterBottom:!0,children:f}),n.jsxs(t.Typography,{variant:"body1",className:u.timelineText,children:[n.jsx(s.default,{className:u.timlineIconRoot,color:"action"}),v]})]})})};u.propTypes={feedItem:l.default.shape({context:l.default.shape({alert:l.default.shape({id:l.default.number.isRequired,name:l.default.string.isRequired,description:l.default.string.isRequired,decision_path:l.default.string.isRequired,level:l.default.string.isRequired}).isRequired}).isRequired}).isRequired,isCorvaV3FeaturesEnabled:l.default.bool,onFeedItemClick:l.default.func},u.defaultProps={isCorvaV3FeaturesEnabled:!1,onFeedItemClick:void 0},module.exports=u;
//# sourceMappingURL=AlertFeedItem.js.map
