import type { Clip as ClipType } from '../../core/models';
export type TrackPointerOperation = 'move' | 'resize-left' | 'resize-right';
export interface TrackInteractionContext {
    clipId: string;
    originalClipsState: ClipType[];
    nonDraggedClips: ClipType[];
    snapCandidateClips: ClipType[];
    pointerStartClientX: number;
    pointerStartClientY: number;
    pointerStartX: number;
    pointerStartY: number;
    dragStartScrollLeft: number;
    lastPointerClientX: number;
    lastPointerClientY: number;
    dragTargetTrackY: number;
    crossTrackDragOffsetY: number;
}
export interface IdleTrackInteractionState {
    kind: 'idle';
}
export interface PressedTrackInteractionState {
    kind: 'pressed';
    operation: TrackPointerOperation;
    context: TrackInteractionContext;
}
export interface DraggingMoveTrackInteractionState {
    kind: 'draggingMove';
    context: TrackInteractionContext;
}
export interface DraggingResizeLeftTrackInteractionState {
    kind: 'draggingResizeLeft';
    context: TrackInteractionContext;
}
export interface DraggingResizeRightTrackInteractionState {
    kind: 'draggingResizeRight';
    context: TrackInteractionContext;
}
export interface BoxSelectingTrackInteractionState {
    kind: 'boxSelecting';
    context: {
        startClientX: number;
        startClientY: number;
        startLocalX: number;
        startLocalY: number;
        currentClientX: number;
        currentClientY: number;
        currentLocalX: number;
        currentLocalY: number;
        additive: boolean;
    };
}
export type TrackInteractionState = IdleTrackInteractionState | PressedTrackInteractionState | DraggingMoveTrackInteractionState | DraggingResizeLeftTrackInteractionState | DraggingResizeRightTrackInteractionState | BoxSelectingTrackInteractionState;
export type TrackInteractionEvent = {
    type: 'POINTER_DOWN';
    operation: TrackPointerOperation;
    clipId: string;
    originalClipsState: ClipType[];
    nonDraggedClips: ClipType[];
    snapCandidateClips: ClipType[];
    clientX: number;
    clientY: number;
    localX: number;
    localY: number;
    scrollLeft: number;
} | {
    type: 'POINTER_MOVE';
    clientX: number;
    clientY: number;
    localY: number;
    activationThreshold: number;
} | {
    type: 'SCROLL_LEFT_CHANGED';
} | {
    type: 'POINTER_UP' | 'VISIBILITY_HIDDEN' | 'WINDOW_BLUR' | 'CANCEL';
} | {
    type: 'BOX_SELECT_START';
    clientX: number;
    clientY: number;
    localX: number;
    localY: number;
    additive: boolean;
} | {
    type: 'BOX_SELECT_MOVE';
    clientX: number;
    clientY: number;
    localX: number;
    localY: number;
} | {
    type: 'BOX_SELECT_END';
};
export interface TrackInteractionTransitionEffects {
    bindGlobalListeners?: boolean;
    unbindGlobalListeners?: boolean;
    updatePreview?: boolean;
    commit?: boolean;
    cleanup?: boolean;
}
export interface TrackInteractionTransitionResult {
    state: TrackInteractionState;
    effects: TrackInteractionTransitionEffects;
}
export declare function createIdleTrackInteractionState(): TrackInteractionState;
export declare function isTrackInteractionActive(state: TrackInteractionState | null | undefined): boolean;
export declare function isTrackInteractionDragging(state: TrackInteractionState | null | undefined): boolean;
export declare function getTrackInteractionContext(state: TrackInteractionState | null | undefined): TrackInteractionContext | null;
export declare function getTrackInteractionOperation(state: TrackInteractionState | null | undefined): TrackPointerOperation | null;
export declare function getTrackInteractionCursor(state: TrackInteractionState | null | undefined): 'ew-resize' | 'grabbing' | null;
export declare function transitionTrackInteraction(state: TrackInteractionState, event: TrackInteractionEvent): TrackInteractionTransitionResult;
export declare function isBoxSelecting(state: TrackInteractionState | null | undefined): boolean;
export declare function getBoxSelectRect(state: TrackInteractionState | null | undefined): {
    x1: number;
    y1: number;
    x2: number;
    y2: number;
} | null;
