import type { ReactiveController, ReactiveControllerHost } from 'lit';
/**
 * The adapter the reorder controller talks to. Narrow on purpose so the controller can be reasoned about (and tested)
 * without the full component. The component supplies one of these.
 */
export interface ReorderHost {
    /** Adds/removes the given class on the host element (for the `is-dragging` user-select guard). */
    toggleHostClass(name: string, force: boolean): void;
    /** Visible leaf data column ids in current display order (EXCLUDING locked control columns). */
    orderedColumnIds(): string[];
    /** The header cell element for a column id, if currently rendered. */
    headerCellEl(columnId: string): HTMLElement | null;
    /** All currently-rendered body cell elements for a column id (the virtual window). */
    bodyCellEls(columnId: string): HTMLElement[];
    /** The scroller element that owns horizontal scroll. */
    scrollerEl(): HTMLElement | null;
    /** The human-readable label for a column id (for the drag chip + announcement). */
    columnLabel(columnId: string): string;
    /** Whether the given column can be reordered. */
    columnMovable(columnId: string): boolean;
    /** Whether the grid is laid out right-to-left. */
    isRtl(): boolean;
    /** Commits a new column order; sets state and emits `wa-column-move` for the given moved column. */
    commitColumnOrder(movedColumn: string, next: string[], finished: boolean): void;
    /** Sets the flag that swallows the next header click so a drag doesn't also sort. */
    setSuppressNextHeaderClick(value: boolean): void;
    /** Attaches the drag ghost to the host's shadow root so `::part(drag-ghost)` can style it. */
    attachGhost(ghost: HTMLElement): void;
}
/**
 * Owns the pointer-drag lifecycle for column reordering. A floating ghost (the picked-up header label, rendered in the
 * top layer via the Popover API) tracks the cursor 1:1 — that's the only thing the user "moves". Underneath, the
 * columns themselves stay in their cells and merely *shuffle* via `translateX` to open a gap that previews where the
 * dragged column will land: the source column slides into that gap and the columns it passes slide the other way to
 * fill its vacated slot. Because the source participates in the shuffle (rather than sitting static), columns never
 * overlap. On drop, the ghost flies into the open gap, fades, and the new order is committed atomically.
 *
 * Geometry is captured once at pickup in scroller-content coordinates so it survives horizontal scroll. Because a
 * re-render wipes the imperative inline transforms, the host re-asserts them from `updated()` via `stampTransforms`.
 *
 * Keyboard reorder (Shift+Arrow) routes through the host's `commitColumnOrder` directly via the navigation controller,
 * so order math (`arrayMove`) lives in one place.
 */
export declare class ColumnReorderController implements ReactiveController {
    private host;
    private pending;
    private startX;
    private startColumnId;
    /** The pointer that started the interaction; events from other pointers (a second touch) are ignored. */
    private activePointerId;
    /** True from drop until the settle animation commits — new pointerdowns are refused meanwhile. */
    private settling;
    private dragging;
    private orderedIds;
    private fromIndex;
    private toIndex;
    private draggedWidth;
    private cellCenters;
    private cellLefts;
    private cellWidths;
    private lastClientX;
    private lastClientY;
    private rafHandle;
    private autoScrollRaf;
    private ghost;
    constructor(element: ReactiveControllerHost, host: ReorderHost);
    hostDisconnected(): void;
    /** Whether a drag is currently in progress (the host reads this to re-stamp transforms after a render). */
    get isDragging(): boolean;
    /** The id of the column being dragged, or `''` when idle. */
    get draggingColumnId(): string;
    /** Pointerdown on a header cell — records the candidate but waits for the threshold before starting a drag. */
    onHeaderPointerDown(event: PointerEvent, columnId: string): void;
    private onPointerMove;
    private onPointerUp;
    /**
     * A canceled drag (browser converts a touch to a scroll/zoom mid-drag) reverts to the pre-drag order — matching
     * the resize path's cancel semantics — instead of committing wherever the preview happened to be.
     */
    private onPointerCancel;
    private startDrag;
    private createGhost;
    /** Moves the ghost so it tracks the cursor (offset slightly down-right of the pointer). */
    private positionGhost;
    private scheduleUpdate;
    /** Computes the drop index from the cursor, stamps the shuffle transforms, positions the ghost, throttled to a frame. */
    private applyDrag;
    /** The last previewed drop index an interim event was emitted for (dedupes the per-frame emit). */
    private lastEmittedToIndex;
    /**
     * Re-applies the current shuffle transforms — call from updated() too, since any re-render wipes inline styles.
     * Every column (the source included) slides to its previewed position so the gap opens cleanly and nothing overlaps:
     * the source slides into the drop slot; the columns it passes slide back to fill its vacated slot.
     */
    stampTransforms(): void;
    /** The content-space offset (translateX) the source must end at to fill the gap at the current `toIndex`. */
    private dropOffset;
    private applyTransform;
    /** Current auto-scroll vector — instance state so the running loop tracks pointer movement inside the band. */
    private autoScrollDir;
    private autoScrollSpeed;
    private updateAutoScroll;
    private commitAndCleanup;
    /** Screen-space position the ghost should fly to on drop: the top-left of the gap the source will occupy. */
    private ghostDropTarget;
    private clearVisuals;
    private removeGhost;
    private teardown;
}
/** Pure helper: returns a copy of `arr` with the element at `from` moved to `to`. */
export declare function arrayMove<T>(arr: T[], from: number, to: number): T[];
