import { CellProps as RACCellProps, ColumnProps as RACColumnProps, RowProps as RACRowProps, TableBodyProps as RACTableBodyProps, TableHeaderProps as RACTableHeaderProps, TableProps as RACTableProps } from 'react-aria-components/Table';
import { ColumnSize } from 'react-stately/useTableState';
import { ContextValue } from 'react-aria-components/slots';
import { StylesPropWithHeight, UnsafeStyles } from './style-utils';
import { DOMProps, DOMRefValue, GlobalDOMAttributes, LinkDOMProps, LoadingState, Node } from '@react-types/shared';
import { GridNode } from 'react-stately/private/grid/GridCollection';
import { Key } from '@react-types/shared';
import { LayoutNode } from 'react-stately/useVirtualizerState';
import React, { FormEvent, FormHTMLAttributes, ReactElement, ReactNode } from 'react';
import { TableLayout } from 'react-aria-components/Virtualizer';
interface S2TableProps {
    /** Whether the Table should be displayed with a quiet style. */
    isQuiet?: boolean;
    /**
     * Sets the amount of vertical padding within each cell.
     * @default 'regular'
     */
    density?: 'compact' | 'spacious' | 'regular';
    /**
     * Sets the overflow behavior for the cell contents.
     * @default 'truncate'
     */
    overflowMode?: 'wrap' | 'truncate';
    /** Handler that is called when a user performs an action on a row. */
    onAction?: (key: Key) => void;
    /**
     * Handler that is called when a user starts a column resize.
     */
    onResizeStart?: (widths: Map<Key, ColumnSize>) => void;
    /**
     * Handler that is called when a user performs a column resize.
     * Can be used with the width property on columns to put the column widths into
     * a controlled state.
     */
    onResize?: (widths: Map<Key, ColumnSize>) => void;
    /**
     * Handler that is called after a user performs a column resize.
     * Can be used to store the widths of columns for another future session.
     */
    onResizeEnd?: (widths: Map<Key, ColumnSize>) => void;
    /** The current loading state of the table. */
    loadingState?: LoadingState;
    /** Handler that is called when more items should be loaded, e.g. while scrolling near the bottom. */
    onLoadMore?: () => any;
    /** Provides the ActionBar to display when rows are selected in the TableView. */
    renderActionBar?: (selectedKeys: 'all' | Set<Key>) => ReactElement;
}
export interface TableViewProps extends Omit<RACTableProps, 'style' | 'className' | 'render' | 'onRowAction' | 'selectionBehavior' | 'onScroll' | 'onCellAction' | 'dragAndDropHooks' | keyof GlobalDOMAttributes>, DOMProps, UnsafeStyles, S2TableProps {
    /** Spectrum-defined styles, returned by the `style()` macro. */
    styles?: StylesPropWithHeight;
}
export declare class S2TableLayout<T> extends TableLayout<T> {
    protected isStickyColumn(node: GridNode<T>): boolean;
    protected buildCollection(): LayoutNode[];
    protected buildLoader(node: Node<T>, x: number, y: number): LayoutNode;
    protected buildBody(y: number): LayoutNode;
    protected buildRow(node: GridNode<T>, x: number, y: number): LayoutNode;
    protected buildTableHeader(): LayoutNode;
    protected buildColumn(node: GridNode<T>, x: number, y: number): LayoutNode;
}
export declare const TableContext: React.Context<ContextValue<Partial<TableViewProps>, DOMRefValue<HTMLDivElement>>>;
/**
 * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
 */
export declare const TableView: React.ForwardRefExoticComponent<TableViewProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
export interface TableBodyProps<T> extends Omit<RACTableBodyProps<T>, 'style' | 'className' | 'render' | keyof GlobalDOMAttributes> {
}
/**
 * The body of a `<Table>`, containing the table rows.
 */
export declare const TableBody: <T extends object>(props: TableBodyProps<T> & React.RefAttributes<DOMRefValue<HTMLDivElement>>) => ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
export interface ColumnProps extends Omit<RACColumnProps, 'style' | 'className' | 'render' | keyof GlobalDOMAttributes> {
    /** Whether the column should render a divider between it and the next column. */
    showDivider?: boolean;
    /** Whether the column allows resizing. */
    allowsResizing?: boolean;
    /**
     * The alignment of the column's contents relative to its allotted width.
     * @default 'start'
     */
    align?: 'start' | 'center' | 'end';
    /** The content to render as the column header. */
    children: ReactNode;
    /** Menu fragment to be rendered inside the column header's menu. */
    menuItems?: ReactNode;
}
/**
 * A column within a `<Table>`.
 */
export declare const Column: React.ForwardRefExoticComponent<ColumnProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
export interface TableHeaderProps<T> extends Omit<RACTableHeaderProps<T>, 'style' | 'className' | 'render' | 'onHoverChange' | 'onHoverStart' | 'onHoverEnd' | keyof GlobalDOMAttributes> {
}
/**
 * A header within a `<Table>`, containing the table columns.
 */
export declare const TableHeader: <T extends object>(props: TableHeaderProps<T> & React.RefAttributes<DOMRefValue<HTMLDivElement>>) => ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
export interface CellProps extends Omit<RACCellProps, 'style' | 'className' | 'render' | keyof GlobalDOMAttributes>, Pick<ColumnProps, 'align' | 'showDivider'> {
    /** @private */
    isSticky?: boolean;
    /** The content to render as the cell children. */
    children: ReactNode;
}
/**
 * A cell within a table row.
 */
export declare const Cell: React.ForwardRefExoticComponent<CellProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
interface EditableCellProps extends Omit<CellProps, 'isSticky'> {
    /** The component which will handle editing the cell. For example, a `TextField` or a `Picker`. */
    renderEditing: () => ReactNode;
    /** Whether the cell is currently being saved. */
    isSaving?: boolean;
    /** Handler that is called when the value has been changed and is ready to be saved. */
    onSubmit?: (e: FormEvent<HTMLFormElement>) => void;
    /** Handler that is called when the user cancels the edit. */
    onCancel?: () => void;
    /** The action to submit the form to. Only available in React 19+. */
    action?: string | FormHTMLAttributes<HTMLFormElement>['action'];
}
/**
 * An editable cell within a table row.
 */
export declare const EditableCell: React.ForwardRefExoticComponent<EditableCellProps & React.RefAttributes<HTMLDivElement>>;
export interface RowProps<T> extends Pick<RACRowProps<T>, 'id' | 'columns' | 'isDisabled' | 'onAction' | 'children' | 'textValue' | 'dependencies' | keyof GlobalDOMAttributes>, LinkDOMProps {
}
/**
 * A row within a `<Table>`.
 */
export declare const Row: <T extends object>(props: RowProps<T> & React.RefAttributes<DOMRefValue<HTMLDivElement>>) => ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
export {};
