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