import { DataCells, DataColumn, DataLayout, DataRow, DataTable } from '../../types/data-structures';
import { YesNo } from '../../types/legacy';
import { onContextMenuType } from '../../types/global';
/**
 * @interface DataTableProps
 * @description Defines the props for the DataTable component.
 */
export interface DataTableProps {
    /**
     * This ref object is used to call methods on component exposed using useImperativeHandle.
     */
    readonly imperativeHandle?: React.RefObject<DataTableImperativeHandle>;
    /**
     * @description The data to be displayed in the table.
     */
    readonly data: DataTable;
    /**
     * @description The list of the initial visible columns
     */
    readonly Columns?: string;
    /**
     * @description The height of each line in the table.
     */
    readonly lineHeight: number;
    /**
     * @description The total height of the table. Plain numbers are treated as px
     */
    readonly TableHeight: string;
    /**
     * @description The symbol of decimal separator from AS400
     */
    readonly decimalSeparator?: string;
    /**
     * @description Optional grouping configuration for the table rows. This prop should be following COL_1,H|COL_2 syntax: that means to group by COL_1 and COL_2 columns but to hide COL_1. Any other character than 'H' will be interpreted as 'visible'.
     */
    readonly DftGroup?: string;
    /**
     * @description Determines what groups of a table are expanded. If a group does not appear, it means it is collapsed. A value 'undefined' will be interpreted as all collapsed.
     */
    readonly expandedGroups?: Set<string>;
    columnSizingMode?: ColumnSizingMode;
    readonly ShowGroup?: YesNo;
    /**
     * @description When true, if isEditable is undefined, it'll force the cell isEditable state to true
     */
    isEditable?: boolean;
    /**
     * @description Optional filter parameter that returns a series of filter in smeup format
     */
    readonly Filter?: string;
    /**
     * @description Optional when true, it enables the data-table multiselection
     */
    readonly MultiSelect?: YesNo;
    /**
     * @description Optional, it defines the totals of the table.
     * @pattern `Funzione(Campo)|Funzione(Campo)|..`
     */
    readonly DftTotal?: string;
    /**
     *
     * @param row The clicked row
     * @param column The clicked columns
     * @returns
     */
    onRowClick?: (row: DataRow, column: string) => void;
    /**
     *
     * @param selectedRows Array of selected rows
     * @returns
     */
    onMultiSelectionChange?: (selectedRows: DataRow[]) => void;
    /**
     * onContextMenu function on appbar components
     */
    onContextMenu?: onContextMenuType;
    /**
     * Passes the current data table state to the component's user whenever a state props changes (typically due to an internal change).
     * @param state
     * @returns
     */
    onStateChange?: (state: DataTableState) => void;
}
/**
 * Contains the informations to be persisted between component unmounts. A state should reflect component changes that occurred after rendering the component to allow framework to store them, and possibly, to restore them.
 */
export type DataTableState = Pick<DataTableProps, "DftGroup" | "expandedGroups">;
/**
 * An object that component user passes to allow calling imperative methods on: this can be thought as a component that exposes some APIs with this interface.
 */
export interface DataTableImperativeHandle {
    setState: (state: DataTableState) => void;
}
/**
 * @interface InternalDataTable
 * @description Represents the internal structure of the data table.
 */
export interface InternalDataTable {
    /**
     * @description The columns of the data table.
     */
    columns: DataColumn[];
    /**
     * @description The rows of the data table, adapted for internal processing.
     */
    rows: internalRows[];
}
/**
 * @interface internalRows
 * @description Defines the structure of a row within the internal data table representation.
 */
export interface internalRows {
    /**
     * @description An optional unique identifier for the row.
     */
    id?: string;
    /**
     * @description The cells that make up this row.
     */
    cells?: DataCells;
    /**
     * @description An optional layout configuration for this row.
     */
    layout?: DataLayout;
    /**
     * @description Indicates whether this row represents a group header.
     */
    isGroup?: boolean;
    /**
     * @description The value of the group if the row is a group header.
     */
    value?: string;
    /**
     * @description The nesting level of the group.
     */
    level?: number;
    /**
     * @description The expanded or collapsed state of the group.
     */
    isExpanded?: boolean;
    /**
     * @description The child rows for expandable/collapsible groups.
     */
    children?: internalRows[];
    /**
     * @description The original data rows associated with this internal row, particularly for groups.
     */
    rows?: DataRow[];
}
type ColumnSizingMode = "fixed" | "fit-grid" | "fit-content";
export declare const DATA_TABLE_DEFAULT_HEIGHT = "400px";
export {};
//# sourceMappingURL=data-table-types.d.ts.map