/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../../_virtual/_rolldown/runtime.cjs");
const require_components_client_BottomSheet_utils = require("./utils.cjs");
let react = require("react");
//#region src/components/client/BottomSheet/useViewportHeight.ts
/**
* Hook to get the viewport height in pixels.
* @returns The viewport height in pixels.
*/
function useViewportHeight() {
	const [viewportHeightPx, setViewportHeightPx] = (0, react.useState)(require_components_client_BottomSheet_utils.getViewportHeightPx);
	(0, react.useEffect)(() => {
		if (typeof window === "undefined") return;
		function onResize() {
			setViewportHeightPx(require_components_client_BottomSheet_utils.getViewportHeightPx());
		}
		onResize();
		window.addEventListener("resize", onResize);
		window.visualViewport?.addEventListener("resize", onResize);
		return () => {
			window.removeEventListener("resize", onResize);
			window.visualViewport?.removeEventListener("resize", onResize);
		};
	}, []);
	return viewportHeightPx;
}
//#endregion
exports.useViewportHeight = useViewportHeight;
