import { type RefObject } from "react"; /** * Return type for the `useFullscreen` hook. */ export interface UseFullscreenReturn { /** * Ref to attach to the element you want to make fullscreen. */ ref: RefObject; /** * Boolean indicating whether the targeted element (or the document) is currently in fullscreen mode. */ isFullscreen: boolean; /** * Any Error object caught during fullscreen transitions, or null if successful. */ error: Error | null; /** * Requests the browser to place the referenced element into fullscreen mode. */ enter: () => Promise; /** * Requests the browser to exit fullscreen mode. */ exit: () => Promise; /** * Toggles the fullscreen state. If currently fullscreen, it will exit. If not, it will enter. */ toggle: () => Promise; } /** * A hook that provides a robust, cross-browser compatible way to make any DOM element fullscreen. * * It manages the native Browser Fullscreen API and tracks the active fullscreen state for the target element. * * @template T - The HTML element type the ref will be attached to. * @returns {UseFullscreenReturn} Object containing the ref to attach, state variables, and control methods. */ export declare function useFullscreen(): UseFullscreenReturn; export default useFullscreen;