
import { ParsedShadow } from "../utils/parseShadow.js";
import { CSSProperties, RefObject } from "react";

//#region src/hooks/useSvgFloatingContent.d.ts
interface UseSvgFloatingContentOptions {
  /** Whether the element is currently open. */
  open: boolean;
  /** Resolved placement after Ariakit positioning (e.g. `'top'`, `'bottom-start'`). */
  effectivePlacement: string;
  /** Border-radius from the component config (px). */
  borderRadius: number;
  /**
   * Ref to the arrow element. Its position is read inside the `updatePosition`
   * callback so the SVG arrow always mirrors where floating-ui places the
   * native arrow.
   */
  arrowRef: RefObject<HTMLDivElement | null>;
  /** Animation duration from the component config (ms). */
  animationDuration: number;
  /** Whether to hide the arrow. */
  hideArrow?: boolean;
  /** Width of the arrow (px). */
  arrowWidth: number;
  /** Height of the arrow (px). */
  arrowHeight: number;
  /** Fraction of the container border-radius applied to round the arrow tip (0 = sharp point, 1 = same radius as the container corners). */
  arrowTipRadiusFraction: number;
}
interface UseSvgFloatingContentReturn {
  internalRef: RefObject<HTMLElement | null>;
  shadowFilterId: string;
  dimensions: {
    width: number;
    height: number;
  };
  shadows: ParsedShadow[];
  shadowPadding: number;
  svgPath: string | null;
  blurClipPath: string | null;
  blurStyle: CSSProperties;
  visible: boolean;
  childTransitionStyle: CSSProperties;
  /**
   * Pixel offset to apply as a CSS transform on the element so that
   * the (clamped) SVG arrow aligns with the trigger center even when the
   * trigger is too small / close to a rounded corner for the arrow to reach.
   */
  shift: {
    x: number;
    y: number;
  };
  /**
   * Pass as the `updatePosition` prop to the Ariakit component.
   * This hooks into floating-ui's positioning lifecycle so the SVG arrow
   * center is read after every `computePosition`
   */
  onPositionUpdate: (props: {
    updatePosition: () => Promise<void>;
  }) => Promise<void>;
}
declare function useSvgFloatingContent({
  open,
  effectivePlacement,
  borderRadius,
  arrowRef,
  animationDuration,
  hideArrow,
  arrowWidth,
  arrowHeight,
  arrowTipRadiusFraction
}: UseSvgFloatingContentOptions): UseSvgFloatingContentReturn;
//#endregion
export { type UseSvgFloatingContentOptions, type UseSvgFloatingContentReturn, useSvgFloatingContent };