import { EventEmitter } from '../../stencil-public-runtime';
import { FloatPlacementX, FloatPlacementY } from './exports';
/**
* Floating positioning utility that anchors content relative to a trigger element. Used internally by `r-tooltip` to control placement and visibility of floating layer.
*
* Example
* ```
*
* Floating content
*
* ```
*
* @slot - Floating content
*
* @part content - Wrap for the floating content
*/
export declare class Float {
host: HTMLElement;
/**
* CSS selector (or bare `id`) of the trigger element the float should anchor to.
* Supports any valid `document.querySelector` string, e.g. `"#my-btn"` or `"r-button"`.
*/
trigger?: string;
/**
* @deprecated Use `setAnchorRef()` for imperative element references.
*
* Backward-compatible usage (property assignment, not HTML attribute):
* `const float = document.querySelector('r-float');`
* `float.anchorEl = triggerElement;`
*
* For new code, prefer: `float.setAnchorRef(triggerElement)`.
* Direct HTMLElement reference to use as the anchor. Takes precedence over `trigger`.
* Use this when the trigger lives inside a shadow root that `document.querySelector` cannot pierce.
*/
anchorEl?: HTMLElement;
/** Whether the float is currently visible. */
open: boolean;
/** Preferred vertical side the float should appear on relative to the trigger. */
placementY: FloatPlacementY;
/** Preferred horizontal alignment of the float relative to the trigger. */
placementX: FloatPlacementX;
/** Gap in pixels between the trigger element and the float box. */
offset: number;
/** Defines if float has arrow pointing to trigger rendered */
arrow: boolean;
/** Emitted when the float becomes visible. */
rFloatShow: EventEmitter;
/** Emitted when the float becomes hidden. */
rFloatHide: EventEmitter;
private floatEl;
private resizeObserver;
private rafId;
private anchorRef;
componentDidLoad(): void;
disconnectedCallback(): void;
handleOpenChange(isOpen: boolean): void;
handlePlacementChange(): void;
handleAnchorElChange(): void;
handleScroll(): void;
handleResize(): void;
/** Show the float. */
show(): Promise;
/** Hide the float. */
hide(): Promise;
/**
* Force a recalculation of the float's position.
* Useful after content changes that affect the box dimensions.
*/
update(): Promise;
/**
* Set anchor element reference for positioning.
* This is intended for integrations that derive trigger elements from slot content.
*
* Example:
* `const float = document.querySelector('r-float');`
* `await float.setAnchorRef(triggerElement);`
*/
setAnchorRef(anchorEl: HTMLElement | null): Promise;
private getTriggerElement;
/**
* Returns the arrow's protrusion size (px) along the axis pointing at the
* trigger. Reads the resolved `height` of the `.r-float::after`
* pseudo-element so consumers overriding the arrow size in CSS with any
* valid length (`0.375rem`, `calc(...)`, `8px`, …) get pixel-correct
* placement. Falls back to the SCSS default of 6px.
*/
private getArrowSize;
private scheduleUpdate;
private attachResizeObserver;
private updatePosition;
/**
* Walks up the flat tree (crossing shadow DOM boundaries) to find the nearest
* ancestor that creates a new containing block for position:fixed children
* via a CSS transform, filter, or perspective. Returns its viewport-relative
* top-left origin so callers can convert viewport coords to that local space.
* Returns { x: 0, y: 0 } when fixed is truly relative to the viewport.
*/
private getFixedContainingBlockOrigin;
private computePlacement;
render(): any;
}