import t from"@babel/runtime/helpers/toConsumableArray";import s from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/regenerator";import{useState as n,useEffect as i}from"react";import"lodash";import"@babel/runtime/helpers/defineProperty";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import{fetchCompanyGoals as e}from"../../api/companies/fetchCompanyGoals.js";import{METRICS_LIST as a}from"../../constants.js";import"../../api/shared/dataFormatter.js";import"../../../../utils/index.js";import{BENCHMARK_METRIC_GOAL as p}from"../../../../constants/goals.js";import"../../../../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"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import{getCompanyGoalSetting as m}from"../../../../utils/goals.js";var c=new Set(a.map((function(t){return t.key}))),l=function(t){return t.filter((function(t){return c.has(t)}))},u=function(a,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hole_depth_change",f=n([]),j=o(f,2),h=j[0],d=j[1];return i((function(){function t(){return(t=s(r.mark((function t(){var s,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e(a);case 2:s=t.sent,o=m(s,p),d(o?l([o]):[]);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}null!==u?c?d(l(c)):a&&function(){t.apply(this,arguments)}():d([])}),[a,c,u]),u&&!h.includes(u)&&d((function(s){return[u].concat(t(s)).slice(0,3)})),[h,d]};export{u as useCompanyMetricKey};
//# sourceMappingURL=useCompanyMetricKey.js.map
