import type { ColumnDef } from '../types/column.types'; import type { ColumnModel } from '../core/column-model'; import type { ColumnGroupModel } from './column-group-model'; import type { ColumnGroupHeaderBuilder } from './column-group-header-builder'; import type { ColumnStyleManager } from '../renderer/column-style-manager'; import type { EventBus } from '../event-bus/event-bus'; import type { IColumnGroupNode } from './column-group.types'; /** * Valid drop-zone positions during a group header drag. */ export type GroupDropPosition = 'before' | 'after' | 'inside'; /** * Describes a potential drop target identified during a group-drag move event. */ export interface GroupDropTarget { /** Whether this is a valid location to drop the dragged node. */ valid: boolean; /** Target group ID or leaf column ID. */ targetId: string; /** Position relative to the target. */ position: GroupDropPosition; /** Pixel x coordinate of the visual drop indicator relative to the grid element. */ indicatorX: number; } /** * Manages drag-and-drop operations for group header cells. * * Handles three drag scenarios: * 1. **Group header drag** — move an entire group (all children move together). * 2. **Leaf inside a married group** — dragging a child moves the parent group. * 3. **Leaf drag out of group** — creates a solo wrapper group at the drop site. * * Drop targets: * - **Another group** — inserts the dragged group before/after the target. * - **Row-grouping bar** — triggers row-grouping for all `groupable` leaves. * - **Outside the grid** — shows a "hide" preview and hides all columns. * * Visual feedback: * - Ghost chip following the cursor. * - Thin vertical drop-indicator line at the insertion point. * - Ghost turns red when dragged outside the grid. */ export declare class ColumnGroupDragHandler { private readonly columnModel; private readonly groupModel; private readonly headerBuilder; private readonly colStyles; private readonly eventBus; /** Returns the root `.pg-grid` element; may be `null` before mount. */ private readonly gridElGetter; /** Currently dragged group ID, `null` when not dragging. */ private draggingId; /** `true` when the dragged node is a group (vs. a leaf). */ private draggingIsGroup; /** Positions the ghost chip with a compositor-only transform. */ private readonly ghost; /** Vertical indicator line shown at the drop target. */ private indicatorEl; /** The grid `.pg-grid` element, captured at drag-start from the getter. */ private gridEl; /** Last computed drop target. */ private currentTarget; /** `true` for the remainder of the current event loop after a drag completes. */ private _didJustDrag; /** * Owns the injected `