import e from"prop-types";import{makeStyles as i,Typography as t}from"@material-ui/core";import{Link as r}from"react-router-dom";import o from"@material-ui/icons/Timeline";import{OPEN_ALERT_DETAILS_ID_STORAGE_KEY as n}from"../../../constants/alerts.js";import{jsx as a,jsxs as l}from"react/jsx-runtime";var s=i((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"}}}})),c=function(e){var i=e.feedItem,c=e.isCorvaV3FeaturesEnabled,d=e.onFeedItemClick,m=s(),u=i.context.alert,p=u.id,f=u.name,v=u.description,h=u.decision_path;return a("div",{children:l("div",{className:m.alertContanier,children:[a(t,{variant:"body1",children:a(r,{className:m.item,to:"/alerts/".concat(p,"/"),onClick:function(e){if(d)return e.preventDefault(),e.stopPropagation(),void d(i);c&&(e.preventDefault(),localStorage.setItem(n,p))},children:f})}),a(t,{variant:"body1",gutterBottom:!0,children:v}),l(t,{variant:"body1",className:m.timelineText,children:[a(o,{className:m.timlineIconRoot,color:"action"}),h]})]})})};c.propTypes={feedItem:e.shape({context:e.shape({alert:e.shape({id:e.number.isRequired,name:e.string.isRequired,description:e.string.isRequired,decision_path:e.string.isRequired,level:e.string.isRequired}).isRequired}).isRequired}).isRequired,isCorvaV3FeaturesEnabled:e.bool,onFeedItemClick:e.func},c.defaultProps={isCorvaV3FeaturesEnabled:!1,onFeedItemClick:void 0};export{c as default};
//# sourceMappingURL=AlertFeedItem.js.map
