import t from"@babel/runtime/helpers/slicedToArray";import{jsxs as s,jsx as o}from"react/jsx-runtime";import{useRef as e,useState as r,useCallback as n}from"react";import{normalizeAsset as i}from"../../AppHeader/AppHeader.constants.js";import{AppDqPopover as p}from"../../AppDqPopover/AppDqPopover.js";import{DqStatusIcon as a}from"./DqStatusIcon/DqStatusIcon.js";import m from"./DqPopover.scss.js";import"../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"lodash";import"../../../clients/subscriptions.v1.js";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import"immutable";import"query-string";import"../../../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"../../../components/GradientManager/configuration/constants.js";import"../../../utils/index.js";import{useWellnessAlerts as c}from"../../../effects/useWellnessAlerts.js";import"lodash/get";import"lodash/isEmpty";import"lodash/sortBy";import"../../../constants/streamSourceType.js";import"../../../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../AppCommonsProvider/AppCommonsProvider.js";import{useAppCommons as l}from"../../AppCommonsProvider/AppCommonsContext.js";import"../../AppSettings/AppSettingsPinningContext.js";import"@babel/runtime/helpers/toConsumableArray";var u=function(u){var d=u.multiRigAssets,j=void 0===d?[]:d,f=u.asset,b=u.forceLoad,g=u.dqData,v=l(),A=v.appId,h=v.maximized,y=c({isDCApp:b,appId:A,multiRigAssets:g?void 0:j.map(i),asset:g?void 0:i(f),maximized:h,dashboards:[]}),C=e(null),D=r(!1),I=t(D,2),T=I[0],x=I[1],P=e(),q=n((function(){clearTimeout(P.current),x(!0)}),[]),S=n((function(t){clearTimeout(P.current),P.current=setTimeout((function(){x(!1)}),t)}),[]),B=n((function(){S(500)}),[S]),M=g||y,E=M.wellnessAlerts.alertsData||{};return M.statusBadgeIconType?s("div",{className:"c-status-badge--".concat(M.statusBadgeIconType),children:[o(a,{ref:C,statusBadgeIconType:M.statusBadgeIconType,onMouseEnter:q,onMouseLeave:B,className:m.statusIcon,hoverable:!0}),o(p,{open:T,anchorEl:C.current,placement:"top-start",onMouseEnter:q,onMouseLeave:B,alertsData:E})]}):null};export{u as DqPopover};
//# sourceMappingURL=DqPopover.js.map
