import React, { ReactNode } from "react";
export interface GanttTask {
    id: string;
    groupId: string;
    title: string;
    startDate: Date | string;
    endDate: Date | string;
    progress: number;
    assignee?: {
        name: string;
        avatar?: string;
    };
    color?: string;
    completed?: boolean;
    dependencies?: string[];
    milestone?: boolean;
    [key: string]: unknown;
}
export interface GanttHoliday {
    date: Date | string;
    label: string;
    color?: string;
}
export interface GanttGroup {
    id: string;
    title: string;
    color: string;
    order?: number;
}
export interface GanttColumn<T extends GanttTask = GanttTask> {
    id: string;
    header: string;
    accessor: keyof T | ((task: T) => ReactNode | string | number | boolean | null | undefined);
    cell?: (task: T, group: GanttGroup) => ReactNode;
    width?: number;
    align?: "left" | "center" | "right";
}
export interface GanttDragState {
    taskId: string;
    mode: "move" | "resize-left" | "resize-right";
    deltaX: number;
}
export type GanttZoom = "day" | "week" | "quarter" | "month" | "year";
export declare const DAY_WIDTHS: Record<GanttZoom, number>;
export type GanttRowType = "group" | "task";
export interface GanttGroupRow {
    type: "group";
    group: GanttGroup;
    taskCount: number;
    completedCount: number;
    earliestStart: Date;
    latestEnd: Date;
}
export interface GanttTaskRow {
    type: "task";
    task: GanttTask;
    group: GanttGroup;
}
export type GanttRow = GanttGroupRow | GanttTaskRow;
export interface GanttChartThemeOverrides {
    baseStyle?: string;
    toolbarStyle?: string;
    tablePanelStyle?: string;
    chartPanelStyle?: string;
    tableHeaderStyle?: string;
    tableHeaderCellStyle?: string;
    tableGroupRowStyle?: string;
    tableTaskRowStyle?: string;
    tableCellStyle?: string;
    timelineHeaderStyle?: string;
    timelineMonthStyle?: string;
    timelineDayStyle?: string;
    gridLineStyle?: string;
    weekendStyle?: string;
    todayMarkerStyle?: string;
    todayColumnStyle?: string;
    taskBarStyle?: string;
    groupBarStyle?: string;
    splitterStyle?: string;
}
export interface GanttContextValue {
    groups: GanttGroup[];
    tasks: GanttTask[];
    columns: GanttColumn[];
    rows: GanttRow[];
    rangeStart: Date;
    rangeEnd: Date;
    totalDays: number;
    dayWidth: number;
    zoom: GanttZoom;
    collapsedGroups: string[];
    hideCompleted: boolean;
    tablePanelWidth: number;
    readonly: boolean;
    readonlyDates: boolean;
    readonlyProgress: boolean;
    onTaskUpdate?: (taskId: string, updates: Partial<GanttTask>) => void;
    onTaskDelete?: (taskId: string) => void;
    onTaskDuplicate?: (taskId: string) => void;
    onTaskAdd?: (groupId: string) => void;
    onGroupAdd?: () => void;
    onTaskClick?: (task: GanttTask, event: React.MouseEvent) => void;
    toggleGroup: (groupId: string) => void;
    setZoom: (zoom: GanttZoom) => void;
    setHideCompleted: (hide: boolean) => void;
    setTablePanelWidth: (width: number) => void;
    theme: GanttChartThemeOverrides;
    todayMarker: boolean;
    todayOffset: number | null;
    scrollToToday: boolean;
    holidays: GanttHoliday[];
    gridLines: "both" | "vertical" | "horizontal" | "none";
    rowHeight: number;
}
/**
 * Frequently-changing interaction state is separated into its own context
 * so that stable consumers (toolbar, grid, table header) don't re-render
 * on hover/focus/drag changes.
 */
export interface GanttInteractionValue {
    hoveredTaskId: string | null;
    setHoveredTaskId: (id: string | null) => void;
    focusedTaskId: string | null;
    setFocusedTaskId: (id: string | null) => void;
    activeDrag: GanttDragState | null;
    setActiveDrag: (state: GanttDragState | null) => void;
}
export interface GanttChartProps {
    data: GanttTask[];
    groups: GanttGroup[];
    columns?: GanttColumn[];
    startDate?: Date | string;
    endDate?: Date | string;
    todayMarker?: boolean;
    scrollToToday?: boolean;
    readonly?: boolean;
    readonlyDates?: boolean;
    readonlyProgress?: boolean;
    zoom?: GanttZoom;
    defaultZoom?: GanttZoom;
    onZoomChange?: (zoom: GanttZoom) => void;
    collapsedGroups?: string[];
    defaultCollapsedGroups?: string[];
    onCollapsedGroupsChange?: (groups: string[]) => void;
    hideCompleted?: boolean;
    defaultHideCompleted?: boolean;
    onHideCompletedChange?: (hide: boolean) => void;
    tablePanelWidth?: number;
    defaultTablePanelWidth?: number;
    onTablePanelWidthChange?: (width: number) => void;
    onTaskUpdate?: (taskId: string, updates: Partial<GanttTask>) => void;
    onTaskDelete?: (taskId: string) => void;
    onTaskDuplicate?: (taskId: string) => void;
    onTaskAdd?: (groupId: string) => void;
    onGroupAdd?: () => void;
    onTaskClick?: (task: GanttTask, event: React.MouseEvent) => void;
    holidays?: GanttHoliday[];
    gridLines?: "both" | "vertical" | "horizontal" | "none";
    className?: string;
    theme?: GanttChartThemeOverrides;
    rowHeight?: number;
}
