import { type CSSProperties } from 'react'; import { type PopoverPlacement } from '../../Popover/Popover.types'; type Options = { minWidth?: CSSProperties['minWidth']; maxHeight?: CSSProperties['maxHeight']; /** * Allowed placements for the popover menu. * When provided, the popover will try each placement in order until it finds one that fits. * * @default ['bottom-start', 'bottom-end', 'top-start', 'top-end'] */ allowedPlacements?: PopoverPlacement[]; /** * Whether to enable viewport constraint for the popover content. * When enabled, the popover will be constrained to fit within the viewport. * When disabled, the popover content can overflow the viewport boundaries. * * @default true */ enableViewportConstraint?: boolean; /** * Whether to constrain the popover width to exactly match the reference element width. * When enabled, both minWidth and maxWidth will be set to the reference width. * * @default false */ constrainToTriggerWidth?: boolean; /** * Enable centered layout on narrow viewport (< 600px). * When enabled, the popover will be centered horizontally on the screen * with 14px margins on both sides, instead of being positioned relative to the trigger. * * @default false */ enableCenteredLayoutOnNarrowViewport?: boolean; }; /** * Manages the placement of a popover menu relative to a target element and trigger element. * * @param options - Configuration options * * @param options.minWidth - The minimum width of the popover menu. Default is the width of the trigger element. * * @param options.allowedPlacements - The allowed placements for the popover menu. Default is ['bottom-start', 'bottom-end', 'top-start', 'top-end']. * * @param options.enableViewportConstraint - Whether to enable viewport constraint for the popover content. Default is true. */ export declare function usePopoverMenuPlacement({ minWidth, maxHeight, allowedPlacements, enableViewportConstraint, constrainToTriggerWidth, enableCenteredLayoutOnNarrowViewport, }?: Options): { refs: { reference: import("react").MutableRefObject; floating: React.MutableRefObject; setReference: (node: HTMLElement | null) => void; setFloating: (node: HTMLElement | null) => void; }; floatingStyles: CSSProperties; update: () => void; }; export {};