import React from "react";
import { DataGridPreferences } from "../../data-grid-preferences";
import type { SelectionProps } from "../../data/table/hooks/useTableSelection";
import type { ColumnDefinitions } from "../../data/table/root/DataGridTable.types";
import { DataGridTable } from "../../data/table/root/DataGridTableRoot";
import type { DataGridSettings } from "./DataGrid.types";
interface DataGridProps<RowT> {
    children: React.ReactNode;
    className?: string;
    style?: React.CSSProperties;
    /**
     * Definitions of the columns to display.
     */
    columns: ColumnDefinitions<RowT>;
    /**
     * The data to display.
     *
     * Each object in the array represents a row, and the properties of the
     * object are used to render the cells based on `columnDefinitions`.
     */
    data: RowT[];
    /**
     * Function to get unique row ID from row data.
     *
     * If not provided, the row index will be used as ID.
     * This can cause issues if your data changes dynamically,
     * so it's recommended to provide a stable ID if possible.
     */
    getRowId?: (rowData: RowT) => string;
    /**
     * Object with props related to row selection.
     */
    selection?: SelectionProps<RowT>;
    /**
     * Determines if the data grid is in a loading state.
     * See `loadingContent` prop on the `DataGrid.Table` component for display settings.
     * @default false
     */
    isLoading?: boolean;
    /**
     * Settings for the data grid.
     */
    settings?: DataGridSettings;
    /**
     * Default settings for the data grid. These will be used if `settings` prop is not provided.
     */
    defaultSettings?: DataGridSettings;
    /**
     * Callback fired when settings are changed. The new settings will be passed as an argument.
     */
    onSettingsChange?: (newSettings: DataGridSettings) => void;
}
interface DataGridComponent {
    <RowT>(props: DataGridProps<RowT> & React.RefAttributes<HTMLDivElement>): React.ReactElement | null;
    /**
     * @see 🏷️ {@link DataGridTable.Props}
     *
     * @example
     * <DataGrid columns={columnDefs} data={rowData} getRowId={(row) => row.id}>
     *   <DataGrid.Table />
     * </DataGrid>
     */
    Table: typeof DataGridTable;
    /**
     * @see 🏷️ {@link DataGridPreferences.Props}
     *
     * @example
     * <DataGrid columns={columns} data={data} onSettingsChange={handleSettingsChange}>
     *   <DataGrid.Preferences />
     * </DataGrid>
     */
    Preferences: typeof DataGridPreferences;
}
/**
 * Component for displaying tabular data.
 *
 * **WARNING: This component is in active development and may receive breaking changes outside major releases!**
 *
 * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/datagrid)
 * @see 🏷️ {@link DataGridProps}
 *
 * @example
 * ```jsx
 * <DataGrid columns={columnDefs} data={rowData} getRowId={(row) => row.id}>
 *   <DataGrid.Preferences />
 *   <DataGrid.Table />
 * </DataGrid>
 * ```
 */
declare const DataGridInternal: React.ForwardRefExoticComponent<DataGridProps<any> & React.RefAttributes<HTMLDivElement>>;
declare const DataGrid: DataGridComponent;
export declare namespace DataGrid {
    type Props<T = unknown> = DataGridProps<T>;
    type Columns<T = unknown> = ColumnDefinitions<T>;
    type Selection<T = unknown> = SelectionProps<T>;
    type Settings = DataGridSettings;
    namespace Table {
        type Props<T = unknown> = DataGridTable.Props<T>;
        type Sorting = DataGridTable.Sorting;
        type SortEntry = DataGridTable.SortEntry;
        type SortChangeDetail = DataGridTable.SortChangeDetail;
        type LoadingContent = DataGridTable.LoadingContent;
        type SubRows<T = unknown> = DataGridTable.SubRows<T>;
        type DetailsPanel<T = unknown> = DataGridTable.DetailsPanel<T>;
    }
    namespace Preferences {
        type Props = DataGridPreferences.Props;
    }
}
export { DataGrid, DataGridInternal };
export default DataGrid;
