/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.timelines_bundle_jsonpfunction=window.timelines_bundle_jsonpfunction||[]).push([[7],{72:function(e,t,a){"use strict";a.r(t),a.d(t,"Updated",(function(){return o})),a.d(t,"LastUpdatedAt",(function(){return p})),a.d(t,"default",(function(){return p}));var n=a(4),d=a(17),s=a(0),u=a.n(s),l=a(54);const i=l.i18n.translate("xpack.timelines.updating",{defaultMessage:"Updating..."}),r=l.i18n.translate("xpack.timelines.updated",{defaultMessage:"Updated"}),o=u.a.memo((({date:e,prefix:t,updatedAt:a})=>u.a.createElement(u.a.Fragment,null,t,u.a.createElement(d.FormattedRelative,{"data-test-subj":"last-updated-at-date",key:`formatedRelative-${e}`,value:new Date(a)}))));o.displayName="Updated";const c=` ${r} `,p=u.a.memo((({compact:e=!1,updatedAt:t,showUpdating:a=!1})=>{const[d,l]=Object(s.useState)(Date.now());Object(s.useEffect)((()=>{const e=setInterval((()=>{l(Date.now())}),1e4);return()=>{clearInterval(e)}}),[]);const r=Object(s.useMemo)((()=>a?u.a.createElement("span",null," ",i):e?null:u.a.createElement(o,{date:d,prefix:c,updatedAt:t})),[e,d,a,t]);return u.a.createElement(n.EuiToolTip,{"data-test-subj":"timeline-stream-tool-tip",content:u.a.createElement(o,{date:d,prefix:c,updatedAt:t})},u.a.createElement(n.EuiText,{color:"subdued",size:"xs"},r))}));p.displayName="LastUpdatedAt"}}]);