import{useMemo as n}from"react";import{get as t}from"lodash";import{DEV_CENTER_CLI_APP_ID as o}from"../../../../constants/devcenter.js";import"../../../../constants/goals.js";import{SEGMENTS as a}from"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../utils/env.js";import"../../../GradientManager/configuration/constants.js";var s=function(s){var i,l,r,p,d,e,u,c,m,v=s.app,f=s.appData,j=s.currentDashboardAppsLastAnnotations,g=null==v||null===(i=v.package)||void 0===i||null===(l=i.manifest)||void 0===l||null===(r=l.application)||void 0===r||null===(p=r.ui)||void 0===p?void 0:p.disable_platform_annotations,_=(null==f||null===(d=f.well)||void 0===d?void 0:d.asset_id)||(null==f||null===(e=f.rig)||void 0===e?void 0:e.assset_id),A=(null==f||null===(u=f.well)||void 0===u?void 0:u.company_id)||(null==f||null===(c=f.rig)||void 0===c?void 0:c.company_id),I=v.package&&!g&&v.id!==o&&_&&(null===(m=v.segment)||void 0===m?void 0:m[0])===a.DRILLING,L=n((function(){if(!j||!I)return null;var n=j.find((function(n){return n.id===v.id}));return n?t(n,["last_app_annotation","data"])&&n.last_app_annotation:null}),[j,v]);return{assetIdForAnnotation:_,assetCompanyId:A,isAppSupportsAnnotations:I,appLastAnnotation:L}};export{s as default};
