import { useEffect as r } from "react";
import { throttle as o } from "es-toolkit/function";
import i from "../../../hooks/useEvent.js";
const n = 1100, p = ({ api: e }) => (r(() => {
  const t = () => e?.map?.getViewPort().resize();
  return window.addEventListener("resize", t, { passive: !0 }), () => {
    window.removeEventListener("resize", t);
  };
}, [e?.map]), i(
  "orientationchange",
  o(() => e?.map?.getViewPort().resize(), n),
  { passive: !0 },
  window
), null);
export {
  p as default
};
//# sourceMappingURL=MapSize.js.map
