import { Placement as FloatingPlacement } from '@floating-ui/dom'; import { Placement } from './types.js'; /** Writing direction used to resolve logical sides to physical sides. */ export type Direction = 'ltr' | 'rtl'; /** * Normalize a hyphenated `Placement` for Floating UI's `computePosition`. * * - Logical **sides** (`start`, `end`) resolve to `left` / `right` per the * `direction` argument (`start` is left in LTR, right in RTL). Floating UI * has no logical primary side, so this must be resolved here for the panel * to land on the correct side. * - Logical **alignments** (`bottom-start`, `top-end`) pass through unchanged — * Floating UI's own RTL handling flips those, so they must not be flipped here. * - Physical alignments (`bottom-left`, `left-top`, `start-top`, etc.) map to * the nearest Floating UI placement. * * @param placement - Customer-facing hyphenated placement. * @param direction - Writing direction of the trigger; defaults to `'ltr'`. * @returns Placement value understood by Floating UI. */ export declare function toFloatingPlacement(placement: Placement, direction?: Direction): FloatingPlacement; /** * Surface a Floating UI placement as the public hyphenated `Placement` * form for `actualPlacement` and `onPlacementChange`. * * Floating UI emits four placements that don't appear in the SWC `Placement` * union (`left-start`, `left-end`, `right-start`, `right-end`) — those map * back to their physical equivalents (`left-top`, `left-bottom`, `right-top`, * `right-bottom`). The remaining eight Floating UI placements are already * valid SWC `Placement` values. * * @param placement - Placement returned by Floating UI after `flip`. * @returns Customer-facing hyphenated placement in the SWC `Placement` union. */ export declare function fromFloatingPlacement(placement: FloatingPlacement): Placement;