import e from"@babel/runtime/helpers/defineProperty";import o from"classnames";import{makeStyles as r}from"@material-ui/core";import t from"./AvatarIcon.js";import i from"./LessonsLearnedLeafIcon.js";import{isNativeDetected as n}from"../../../utils/mobileDetect.js";import{getIconForFeedItemType as a,AVATAR_ICON as m}from"../../../utils/feed.js";import{FEED_ITEM_TYPES as s,FEED_ITEM_TYPES_BY_KEY as c}from"../../../constants/feed.js";import{ALERT_LEVEL_COLOR as l}from"../../../constants/alerts.js";import{jsxs as d,Fragment as f,jsx as p}from"react/jsx-runtime";var u=r({icon:{width:32,height:32,backgroundColor:"grey",borderRadius:23,position:"absolute",top:18,left:-16,padding:6},iconWrapper:{display:"inline-block",height:20,width:20,overflow:"hidden"},iconImg:{height:20,width:20},iconNative:{left:"auto"}}),h=function(r){var t,i=r.feedItem,a=r.feedItemType,m=r.icon,s=u(),d=c[a]?c[a].label:"Other";if(a===c.alert.type){var f,h,v=null===(f=i.context)||void 0===f||null===(h=f.alert)||void 0===h?void 0:h.level;t={backgroundColor:l[v]}}return p("div",{className:o(s.icon,e({},s.iconNative,n)),style:t,children:p("div",{className:s.iconWrapper,children:p("img",{src:m,alt:"".concat(d," icon"),className:s.iconImg})})})},v=function(e){var o=e.feedItem,r=e.displayName,n=e.isRecommended,c=e.currentUser,l=o.type,u=a(l),v=l===s.LESSONS_LEARNED;return u===m||v?d(f,{children:[p(t,{displayName:r,feedItem:o,isRecommended:n,currentUser:c}),v&&p(i,{offsetX:-22,offsetY:32})]}):p(h,{icon:u,feedItem:o,feedItemType:l})};export{v as default};
//# sourceMappingURL=Icon.js.map
