(window.webpackJsonp=window.webpackJsonp||[]).push([[276],{2520:function(e,t,n){"use strict";n.r(t);var r=n(5),o=(n(25),n(39),n(45)),l={layout:"DoctorDashboardLayout",data:function(){return{alertsVersion:"",refreshKey:0}},mounted:function(){var e=this;this._doctorAlertsInterval=setInterval((function(){e.syncDoctorAlerts()}),15e3),window.addEventListener("focus",this.handleResume),document.addEventListener("visibilitychange",this.handleVisibilityChange)},beforeDestroy:function(){clearInterval(this._doctorAlertsInterval),window.removeEventListener("focus",this.handleResume),document.removeEventListener("visibilitychange",this.handleVisibilityChange)},methods:{updateAlertsVersion:function(e){this.alertsVersion=(null==e?void 0:e.lastKnownVersion)||(null==e?void 0:e.latestVersion)||(null==e?void 0:e.currentVersion)||(null==e?void 0:e.version)||(null==e?void 0:e.alertsVersion)||this.alertsVersion},syncDoctorAlerts:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.a.syncReactiveStaffAlerts();case 3:n=t.sent,e.updateAlertsVersion(n),null!=n&&n.changed&&(e.refreshKey+=1),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.error("Error syncing doctor alerts page:",t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},handleResume:function(){this.syncDoctorAlerts()},handleVisibilityChange:function(){document.hidden||this.syncDoctorAlerts()}}},c=n(10),component=Object(c.a)(l,(function(){var e=this,t=e._self._c;return t("div",[t("AlertsPage",{attrs:{isMobile:!0,role:"doctor","refresh-key":e.refreshKey},on:{"alerts-version":e.updateAlertsVersion}})],1)}),[],!1,null,null,null);t.default=component.exports;installComponents(component,{AlertsPage:n(86).default})}}]);