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