/** * The type of view to render based on device characteristics. */ export type AdaptiveView = "mobile" | "desktop"; /** * Return type for the useAdaptiveView hook. */ export interface UseAdaptiveViewReturn { /** * The current adaptive view type. */ view: AdaptiveView; /** * True when the device should use mobile-optimized UI (Dialog). */ isMobile: boolean; /** * True when the device should use desktop-optimized UI (Popover). */ isDesktop: boolean; } /** * Custom hook for detecting whether to use mobile or desktop UI patterns. * * This hook determines the optimal UI pattern (e.g., Dialog vs Popover) by combining: * - Screen size via useBreakpoint (viewport width) * - Pointer precision via CSS media query (pointer: coarse) * * A device is considered "mobile" when it has both: * - A small screen (below md breakpoint, < 768px) * - A coarse pointer (touch-primary input) * * This approach correctly identifies: * - Mobile phones → mobile view (Dialog) * - iPads/tablets → desktop view (Popover) due to larger screens * - Touch laptops → desktop view (Popover) due to fine pointer primary * - Desktop → desktop view (Popover) * * @returns Object containing view type and boolean flags for mobile/desktop * * @example * const { isMobile } = useAdaptiveView(); * * return isMobile ? ( * {children} * ) : ( * {children} * ); */ export declare function useAdaptiveView(): UseAdaptiveViewReturn;