import { MutableRefObject, PointerEvent as ReactPointerEvent, ReactNode, RefObject } from 'react';
export type DraggablePosition = {
    /**
     * Top offset in pixels relative to the active positioning context.
     */
    top: number;
    /**
     * Left offset in pixels relative to the active positioning context.
     */
    left: number;
    /**
     * Indicates whether the element has been moved by dragging at least once.
     */
    hasDragged: boolean;
};
export type UseDraggableResult<T extends HTMLElement> = {
    /**
     * Ref that must be attached to the draggable element container.
     */
    draggableRef: MutableRefObject<T | null>;
    /**
     * Indicates whether a drag interaction is currently active.
     */
    isDragging: boolean;
    /**
     * Current draggable coordinates and drag-state metadata.
     */
    position: DraggablePosition;
    /**
     * Pointer down handler for the dedicated drag handle element.
     */
    onDragHandleDown: (event: ReactPointerEvent<HTMLElement>) => void;
    /**
     * Renders the provided element through the shared portal root in viewport mode.
     * An optional custom target can be passed for specialized overlay hosts.
     * In container mode, the element is returned unchanged and this helper is usually not needed.
     */
    renderElement: (element: ReactNode, target?: HTMLElement | null) => ReactNode;
};
export type UseDraggableElementOptions = {
    /**
     * Defines whether drag coordinates are resolved against the viewport or a collision container.
     * Viewport mode also enables portal rendering via `renderElement`.
     */
    positioning?: 'viewport' | 'container';
    /**
     * Optional initial position for the draggable element.
     * Use `center` to center the element inside the active positioning context on mount.
     */
    initialPosition?: 'center' | Pick<DraggablePosition, 'top' | 'left'>;
    /**
     * Optional container whose visible client rect is used as the drag boundary in container mode.
     */
    collisionContainerRef?: RefObject<HTMLElement | null>;
};
declare const useDraggableElement: <T extends HTMLElement = HTMLDivElement>(options?: UseDraggableElementOptions) => UseDraggableResult<T>;
export default useDraggableElement;
