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