import { ReactNode } from 'react';
import { TableColumnDefinition, TableHorizontalAlign, TableRowData, TableRowId, TableVerticalAlign } from '../Table.types';
import { TableViewHeader } from '../model/tableView.types';
export type RenderHeaderColumn<RowType extends TableRowData> = {
    id: string;
    columnKey?: string;
    label: ReactNode;
    icon?: string;
    filter?: ReactNode;
    hideLabel?: boolean;
    width?: number | string;
    mobileLabel?: string;
    horizontalAlign?: TableHorizontalAlign;
    verticalAlign?: TableVerticalAlign;
    headerClassName?: string;
    hideOnMobile?: boolean;
    sortable?: boolean;
    draggable?: boolean;
    resizeable?: boolean;
    minResizeWidth?: number;
    maxResizeWidth?: number;
    row: number;
    colSpan: number;
    rowSpan: number;
    source?: RowType;
};
/**
 * Mutable draft of the current render pass.
 *
 * The table keeps React composability, but still needs a normalized table model
 * for features such as header placement, footer detection, virtualization, and
 * stable body-row rendering.
 *
 * The table therefore works in two internal stages:
 * 1. Header/body/footer sub-components register the structure they produce into this draft.
 * 2. `Table` promotes that draft into stable draft state and renders from that.
 *
 * The draft is intentionally recreated on every render pass and must not be treated
 * as persistent state.
 */
export type TableRenderDraft<RowType extends TableRowData> = {
    headerColumns: RenderHeaderColumn<RowType>[];
    bodyRows: {
        rowId: TableRowId;
        rowIndex: number;
        kind: 'data' | 'expanded' | 'expanded-full-width' | 'group' | 'group-footer' | 'spacer';
        disabled?: boolean;
        selectable?: boolean;
        render: () => ReactNode;
    }[];
    bodyMaxHeight?: string;
    hasFooter?: boolean;
    hasFooterCells?: boolean;
    hasExpandableRows?: boolean;
};
export type RenderBodyRow<RowType extends TableRowData> = Omit<TableRenderDraft<RowType>['bodyRows'][number], 'render'>;
/**
 * Structural render context.
 *
 * This context only carries the normalized render model built from the current
 * render pass. Public render configuration such as `rowClassName` or card/table
 * view mode lives in `TableRenderConfigContext`.
 */
export type TableRenderContextValue<RowType extends TableRowData> = {
    header?: TableViewHeader<RowType>;
    columns: RenderHeaderColumn<RowType>[];
    columnDefinitionsByKey: Map<string, TableColumnDefinition<RowType>>;
    columnIndexByKey: Map<string, number>;
    bodyRows: RenderBodyRow<RowType>[];
    renderBodyRow?: (row: RenderBodyRow<RowType>) => ReactNode;
    renderDraft: TableRenderDraft<RowType>;
    hasFooterCells?: boolean;
    hasExpandableRows?: boolean;
    /**
     * Switches body rows into the registration pass.
     *
     * While this flag is true, row components register their normalized metadata in
     * `renderDraft.bodyRows` and return `null` instead of rendering DOM directly.
     * `TableBody` then performs the second pass by rendering the collected rows
     * through `renderBodyRow(...)`.
     */
    isRegisteringBodyRows?: boolean;
};
export declare const TableRenderContext: import('react').Context<TableRenderContextValue<TableRowData> | null>;
export declare const useOptionalTableRenderContext: <RowType extends TableRowData>() => TableRenderContextValue<RowType> | null;
export declare const useTableRenderContext: <RowType extends TableRowData>() => TableRenderContextValue<RowType>;
