import{__awaiter as t,__generator as e,__assign as r}from'./../../../ext-esm/tslib/tslib.es6.js';import{getAppStorage as n}from"../../../clients/jsonApi/index.js";function s(s){return function(i,o){return t(this,void 0,void 0,(function(){var t,l;return e(this,(function(e){switch(e.label){case 0:t=null,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,n(s.provider,s.collection,i,r(r({},s.params),{query:o?"{timestamp#lt#".concat(o,"}"):null,sort:"{timestamp: -1}",limit:1}))];case 2:return t=e.sent(),[3,4];case 3:return l=e.sent(),console.error(l),[3,4];case 4:return[2,t]}}))}))}}export{s as initialDataFetcher};
