import{useEffect as t}from"react";import{scheduleIdleWork as e,cancelIdleWork as r}from"../cache-utils/idle-callback.js";import{STORAGE_KEY as o}from"./constants.js";import{validateEnvelope as a}from"./validateEnvelope.js";var i=function(i,n){t((function(){var t=n.current,m=e((function(){t.delete(m);try{var e=sessionStorage.getItem(o);if(!e)return;var r=JSON.parse(e),n=a(r);n&&(i.current={wellIds:n,timestamp:r.timestamp})}catch(t){sessionStorage.removeItem(o)}}),{timeout:2e3});return t.add(m),function(){r(m),t.delete(m)}}),[i,n])};export{i as useHydrateFromStorage};
//# sourceMappingURL=useHydrateFromStorage.js.map
