import { Box } from '../../util/box.js'; import type { PropType, Ref } from 'vue'; import type { Anchor } from '../../util/index.js'; export interface LocationStrategyData { contentEl: Ref; target: Ref; isActive: Ref; isRtl: Ref; } export type LocationStrategyFunction = (data: LocationStrategyData, props: StrategyProps, contentStyles: Ref>) => undefined | { updateLocation: (e?: Event) => void; }; declare const locationStrategies: { static: typeof staticLocationStrategy; connected: typeof connectedLocationStrategy; }; export interface StrategyProps { locationStrategy: keyof typeof locationStrategies | LocationStrategyFunction; location: Anchor; origin: Anchor | 'auto' | 'overlap'; offset?: number | string | number[]; stickToTarget?: boolean; viewportMargin?: number | string; maxHeight?: number | string; maxWidth?: number | string; minHeight?: number | string; minWidth?: number | string; } export declare const makeLocationStrategyProps: (defaults?: Defaults | undefined) => { locationStrategy: unknown extends Defaults["locationStrategy"] ? { type: PropType; default: string; validator: (val: any) => boolean; } : Omit<{ type: PropType; default: string; validator: (val: any) => boolean; }, "default" | "type"> & { type: PropType; default: unknown extends Defaults["locationStrategy"] ? "connected" | "static" | LocationStrategyFunction : Defaults["locationStrategy"] | NonNullable<"connected" | "static" | LocationStrategyFunction>; }; location: unknown extends Defaults["location"] ? { type: PropType; default: string; } : Omit<{ type: PropType; default: string; }, "default" | "type"> & { type: PropType; default: unknown extends Defaults["location"] ? Anchor : Defaults["location"] | NonNullable; }; origin: unknown extends Defaults["origin"] ? { type: PropType; default: string; } : Omit<{ type: PropType; default: string; }, "default" | "type"> & { type: PropType; default: unknown extends Defaults["origin"] ? "auto" | "overlap" | Anchor : Defaults["origin"] | NonNullable<"auto" | "overlap" | Anchor>; }; offset: unknown extends Defaults["offset"] ? PropType : { type: PropType; default: unknown extends Defaults["offset"] ? string | number | number[] | undefined : Defaults["offset"] | NonNullable; }; stickToTarget: unknown extends Defaults["stickToTarget"] ? BooleanConstructor : { type: PropType; default: unknown extends Defaults["stickToTarget"] ? boolean : boolean | Defaults["stickToTarget"]; }; viewportMargin: unknown extends Defaults["viewportMargin"] ? { type: (NumberConstructor | StringConstructor)[]; default: number; } : Omit<{ type: (NumberConstructor | StringConstructor)[]; default: number; }, "default" | "type"> & { type: PropType; default: unknown extends Defaults["viewportMargin"] ? string | number : Defaults["viewportMargin"] | NonNullable; }; }; export declare function useLocationStrategies(props: StrategyProps, data: LocationStrategyData): { contentStyles: Ref<{}, {}>; updateLocation: Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>; }; declare function staticLocationStrategy(): void; declare function connectedLocationStrategy(data: LocationStrategyData, props: StrategyProps, contentStyles: Ref>): { updateLocation: () => { available: { x: number; y: number; }; contentBox: Box; flipped: { x: boolean; y: boolean; }; } | undefined; };