import{get as e}from"lodash";import{FEED_ITEM_TYPES as a}from"../constants/feed.js";import{convertDateStringToUnixTimestamp as t}from"./time.js";var O="AVATAR_ICON",c=[a.POST,a.APP_ANNOTATION,a.GEOSTEERING_COMMENTS,a.DVD_COMMENT,a.HOOKLOAD_BROOMSTICK_COMMENT,a.PC_COMMENT,a.NPT_LESSONS_COMMENT,a.TRACES_MEMO,a.DEPTH_COMMENTS];function s(e){return c.includes(e)}function E(e){if(s(e))return"AVATAR_ICON";switch(e){case a.ALERT:return"/static/media/27836bcdc3e809b0c0f1852a4b5a7e9e.svg";case a.OPERATION_SUMMARY:case a.COMPLETION_OPERATION_SUMMARY:return"/static/media/c90b07a56f57b35270d42804a6610c78.svg";case a.OPERATIONAL_NOTE:case a.COMPLETION_OPERATIONAL_NOTE:return"/static/media/eb59357d9fdc0d3aa2556c4accf76a1e.svg";case a.BHA:return"/static/media/2f3ed40f34ad7a7f2e6a5e1eda45c5f4.svg";case a.DAILY_COST:case a.COMPLETION_DAILY_COST:return"/static/media/27afcb4e5f3f2b6d8fc1166fe4dc5580.svg";case a.DOCUMENT:return"/static/media/b976051fc561f69a449fa6b1575a9f38.svg";case a.DRILLER_MEMO:return"/static/media/f8311dcb5efee59526c9665598ff8916.svg";case a.FLUID_REPORT:return"/static/media/493f8add7c4f51e48777410e8adcd94b.svg";case a.SURVEY_STATION:return"/static/media/48c0221a3d0faf6ab12f78c420df8e3a.svg";case a.LESSONS_LEARNED:return"/static/media/de87fc2dd3cd91d1433e2ead8e03c691.svg";case a.NPT_EVENT:case a.COMPLETION_NPT_EVENT:return"/static/media/fb4963d919e404d306afbca0bf0d4386.svg";default:return"/static/media/1f460d664d596ce949f316a08308473d.svg"}}function T(t,O){var c,s,E=e(t,["context",t.type,"data"])||e(t,["context",t.type]);switch(t.type){case a.DEPTH_COMMENTS:return null==E?void 0:E.commentDepth;case a.HOOKLOAD_BROOMSTICK_COMMENT:return null==E?void 0:E.measuredDepth;case a.BHA:return O?null==E?void 0:E.tvd_start:null==E?void 0:E.start_depth;case a.FLUID_REPORT:return null==E?void 0:E.depth;case a.SURVEY_STATION:return O?null==E?void 0:E.tvd:null==E?void 0:E.measured_depth;case a.NPT_EVENT:case a.COMPLETION_NPT_EVENT:return O?null==E?void 0:E.tvd_start:null==E?void 0:E.depth;case a.NPT_LESSONS_COMMENT:case a.PC_COMMENT:case a.DRILLING_DYSFUNCTION_EVENT:case a.TRACES_MEMO:case a.DVD_COMMENT:return null==E?void 0:E.holeDepth;case a.LESSONS_LEARNED:return O?null==E?void 0:E.tvd_start:null==E?void 0:E.md_start;case a.GEOSTEERING_COMMENTS:return null==E||null===(c=E.axis)||void 0===c?void 0:c.MD;case a.ALERT:return null!==(s=null==E?void 0:E.start_hole_depth)&&void 0!==s?s:null;case a.WELL_PLAN:case a.APP_ANNOTATION:case a.DRILLER_MEMO:case a.DOCUMENT:case a.COMPLETION_DOCUMENT:case a.OPERATION_SUMMARY:case a.OPERATIONAL_NOTE:case a.COMPLETION_OPERATIONAL_NOTE:case a.POST:case a.DAILY_COST:case a.COMPLETION_DAILY_COST:default:return null}}function N(O){var c=e(O,["context",O.type]),s=e(O,["context",O.type,"data"])||c;switch(O.type){case a.DEPTH_COMMENTS:return null==s?void 0:s.recordTimestamp;case a.HOOKLOAD_BROOMSTICK_COMMENT:return null==s?void 0:s.timestamp;case a.BHA:return null==s?void 0:s.start_timestamp;case a.FLUID_REPORT:case a.DAILY_COST:return null==s?void 0:s.date;case a.SURVEY_STATION:case a.POST:case a.GEOSTEERING_COMMENTS:return null!=O&&O.created_at?t(O.created_at):null;case a.NPT_EVENT:case a.COMPLETION_NPT_EVENT:return null==s?void 0:s.start_time;case a.NPT_LESSONS_COMMENT:case a.PC_COMMENT:case a.DRILLING_DYSFUNCTION_EVENT:case a.TRACES_MEMO:case a.DVD_COMMENT:return null==s?void 0:s.timestamp;case a.LESSONS_LEARNED:return null==s?void 0:s.start_time;case a.OPERATION_SUMMARY:case a.OPERATIONAL_NOTE:return null==s?void 0:s.date_time;case a.ALERT:return null!=c&&c.alert_at?t(c.alert_at):null;case a.WELL_PLAN:case a.APP_ANNOTATION:case a.DRILLER_MEMO:case a.DOCUMENT:case a.COMPLETION_DOCUMENT:case a.COMPLETION_OPERATIONAL_NOTE:case a.COMPLETION_DAILY_COST:default:return null}}export{O as AVATAR_ICON,T as getFeedDepth,N as getFeedItemTimestamp,E as getIconForFeedItemType,s as isAvatarIcon};
//# sourceMappingURL=feed.js.map
