import { Placement as Placement$1, Strategy } from "../node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
import { MiddlewareData } from "../node_modules/@floating-ui/core/dist/floating-ui.core.js";
import { ReferenceType } from "../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
import { UsePopoverProps } from "./usePopover.types.js";
import * as react from "react";
import * as _floating_ui_react0 from "@floating-ui/react";

//#region src/popover/usePopover.d.ts
/**
 * Controls the logic of positioning and managing a floating popover.
 * Takes multiple configuration props that control closing, placement or behavior.
 * Exposes functions used for ref callbacks on consuming components, programmatic open/close methods and properties.
 */
declare function usePopover(props?: UsePopoverProps): {
  close: () => void;
  context: {
    x: number;
    y: number;
    placement: Placement$1;
    strategy: Strategy;
    middlewareData: MiddlewareData;
    isPositioned: boolean;
    update: () => void;
    floatingStyles: React.CSSProperties;
    open: boolean;
    onOpenChange: (open: boolean, event?: Event, reason?: _floating_ui_react0.OpenChangeReason) => void;
    events: _floating_ui_react0.FloatingEvents;
    dataRef: React.MutableRefObject<_floating_ui_react0.ContextData>;
    nodeId: string | undefined;
    floatingId: string | undefined;
    refs: _floating_ui_react0.ExtendedRefs<_floating_ui_react0.ReferenceType>;
    elements: _floating_ui_react0.ExtendedElements<_floating_ui_react0.ReferenceType>;
  };
  floatingStyles: react.CSSProperties;
  getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
  getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
  isMounted: boolean;
  isOpen: boolean;
  open: () => void;
  popper: HTMLElement | null;
  reference: HTMLElement | null;
  refs: {
    reference: react.MutableRefObject<ReferenceType | null>;
    floating: React.MutableRefObject<HTMLElement | null>;
    setReference: (node: ReferenceType | null) => void;
    setFloating: (node: HTMLElement | null) => void;
  } & _floating_ui_react0.ExtendedRefs<_floating_ui_react0.ReferenceType>;
  setPopper: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
  setReference: ((node: ReferenceType | null) => void) & ((node: _floating_ui_react0.ReferenceType | null) => void);
  transitionStyles: react.CSSProperties;
};
type UsePopoverType = ReturnType<typeof usePopover>;
//#endregion
export { UsePopoverType, usePopover };

//# sourceMappingURL=usePopover.d.ts.map