"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../chunk-BN4qSVkS.cjs");
let react = require("react");
//#region src/hooks/useKeyboardOffset.tsx
/**
* Hook to handle iOS keyboard viewport changes.
* Returns the offset needed to keep elements above the keyboard.
*/
function useKeyboardOffset() {
	const [keyboardOffset, setKeyboardOffset] = (0, react.useState)(0);
	(0, react.useEffect)(() => {
		const viewport = window.visualViewport;
		if (!viewport) return;
		const handleResize = () => {
			const offset = window.innerHeight - viewport.height;
			setKeyboardOffset(Math.max(0, offset));
		};
		handleResize();
		viewport.addEventListener("resize", handleResize);
		viewport.addEventListener("scroll", handleResize);
		return () => {
			viewport.removeEventListener("resize", handleResize);
			viewport.removeEventListener("scroll", handleResize);
		};
	}, []);
	return keyboardOffset;
}
//#endregion
exports.useKeyboardOffset = useKeyboardOffset;
