import{useRef as r,useCallback as e}from"react";import{computeCurrentTileSafeZoom as t,MIN_ZOOM_DELTA as o}from"../utils/smartFitBounds.js";var n=function(n){var i=n.mapRef,a=n.isEnabled,u=r(!1);return{handleResize:e((function(){var r;if(a){var e=null===(r=i.current)||void 0===r?void 0:r.getMap();if(e)if(u.current)u.current=!1;else{var n=e.getZoom(),f=t(e);null===f||f<=n+o||(u.current=!0,e.easeTo({zoom:f,duration:300}))}}}),[i,a])}};export{n as useTileSafeEnforcement};
//# sourceMappingURL=useTileSafeEnforcement.js.map
