import type { GanttProjection, Rect, Viewport } from '@univerjs/core';
import type { IBaseProjectedRowLayoutItem } from '../base-canvas-render-utils';
export type GanttTimelineScale = GanttProjection['timeline']['scale'];
export interface IGanttLayoutColumn {
    id: string;
    label: string;
    majorLabel?: string;
    start: number;
    end: number;
    rect: Rect;
    nonWorking?: boolean;
}
export interface IGanttLayoutMajorHeader {
    id: string;
    label: string;
    start: number;
    end: number;
    rect: Rect;
}
export interface IGanttLayoutBar {
    recordId: string;
    title: string;
    start: number;
    end: number;
    color: string;
    progress?: number;
    workingDayCount?: number;
    rect: Rect;
    row: IBaseProjectedRowLayoutItem;
    labelInside: boolean;
}
export interface IGanttLayout {
    leftPane: Rect;
    timeline: Rect;
    timelineHeader: Rect;
    timelineMajorHeader: Rect;
    timelineMinorHeader: Rect;
    timelineBody: Rect;
    collapseButton: Rect;
    controls: {
        scale: Array<{
            scale: GanttTimelineScale;
            rect: Rect;
            active: boolean;
            label: string;
        }>;
        today: Rect;
        prev: Rect;
        next: Rect;
    };
    rowLayout: IBaseProjectedRowLayoutItem[];
    visibleRows: IBaseProjectedRowLayoutItem[];
    columns: IGanttLayoutColumn[];
    majorHeaders: IGanttLayoutMajorHeader[];
    bars: IGanttLayoutBar[];
    totalTimelineWidth: number;
    maxScrollX: number;
    maxScrollY: number;
    headerHeight: number;
}
export interface IGanttLayoutOptions {
    viewport: Viewport;
    rowLayout: IBaseProjectedRowLayoutItem[];
    scrollX?: number;
    scrollY?: number;
    rowOverscanPx?: number;
}
export interface IGanttBarScrollTarget {
    scrollX: number;
    scrollY: number;
}
export interface IGanttInitialScrollOptions {
    rowLayout?: IBaseProjectedRowLayoutItem[];
    scrollY?: number;
}
export declare function getGanttBarsByRecordId(projection: GanttProjection): Map<string, GanttProjection['bars'][number]>;
export declare function getGanttBarDisplayEnd(bar: Pick<GanttProjection['bars'][number], 'start' | 'end'>, _projection: GanttProjection): number;
export declare function getGanttBarDisplayStart(bar: Pick<GanttProjection['bars'][number], 'start' | 'end'>): number;
export declare function getGanttFieldRangeFromDisplayRange(start: number, end: number, _projection: GanttProjection): {
    start: number;
    end: number;
};
export declare function buildGanttLayout(projection: GanttProjection, options: IGanttLayoutOptions): IGanttLayout;
export declare function getGanttLeftPaneWidth(projection: GanttProjection, viewportWidth: number): number;
export declare function snapGanttTime(value: number, projection: GanttProjection): number;
export declare function ganttXToTime(x: number, projection: GanttProjection, timelineX: number, unitWidth: number, scrollX: number): number;
export declare function getGanttBarScrollTarget(projection: GanttProjection, recordId: string, viewport: Viewport, rowLayout: IBaseProjectedRowLayoutItem[], options?: {
    currentScrollX?: number;
    currentScrollY?: number;
}): IGanttBarScrollTarget | null;
export declare function getGanttInitialScrollX(projection: GanttProjection, viewport: Viewport, options?: IGanttInitialScrollOptions): number;
