import { useRef as i, useEffect as o } from "react";
function r(n) {
  const e = i(n);
  e.current = n, o(() => {
    const t = window.minisEvents.on("MINI_APP_CLOSE", () => {
      e.current();
    });
    return () => window.minisEvents.off(t);
  }, []);
}
export {
  r as useOnMiniClose
};
//# sourceMappingURL=useOnMiniClose.js.map
