import{useMemo as t}from"react";import r from"lodash/isEqual";import{useViewportStore as o}from"../../../../stores/viewport-store/useViewportStore.js";import{estimateTileCount as e,MAX_VIEWPORT_TILES_FOR_FETCH as i,getTilesForViewport as n,tilesToGeoJSON as u}from"../../../../utils/tile-math.js";var s={type:"FeatureCollection",features:[]},l=function(){var l=o((function(t){return t.bounds?e(t.bounds)>i?[]:n(t.bounds).filter((function(r){var o;return"loaded"!==(null===(o=t.tiles.get(r))||void 0===o?void 0:o.status)})):[]}),r);return t((function(){return 0===l.length?s:u(l)}),[l])};export{l as useLoadingTilesGeoJSON};
//# sourceMappingURL=useLoadingTilesGeoJSON.js.map
