import { LocationDescriptor } from 'history';
import React, { ReactElement } from 'react';
import { ActionData } from '..';
import { Data } from '../../types/data';
import { Column, ItemSelectEventArgs, ListElement, ListSelectMode, SortData } from './List.model';
import { ListRowProps } from './ListRow/ListRow';
export interface ListProps<T extends Data> {
    /**
     * Column definitions
     * The order of this array determines the order of columns
     */
    columns: Column<T>[];
    /** The name of the property on the data object that should be used to identify objects (default: 'id')  */
    keyProperty?: keyof T;
    /** List data */
    data: T[];
    /** Defines whether data is being loaded (default: false) */
    isLoading?: boolean;
    /** Defines whether there was an error with the data. If true a button will be shown that will trigger `onRetry` when hit. */
    isError?: boolean;
    /** Optional error message to display if an error occurs. (default: 'There was an error.) */
    errorMsg?: string;
    /** Determines whether the component should render the error message and the 'onRetry' button. Set this to false if error handling will be done outside this component. (default: true) */
    handleRetry?: boolean;
    /** Minimum width of this component */
    minimumWidth?: string;
    /** Spacing between columns */
    columnGap?: string;
    /** Header row height */
    headerRowHeight?: string;
    /** List row height */
    listRowHeight?: string;
    /** List row action button and checkbox size (default: '50px') */
    listRowActionSize?: string;
    /** Header checkbox size (default: '28px') */
    headerRowActionSize?: string;
    /** Spacing between rows */
    rowGap?: string;
    /** Horizontal alignment of text */
    horizontalTextAlign?: 'left' | 'right' | 'center';
    /** Vertical alignment of text */
    verticalTextAlign?: 'start' | 'center' | 'end';
    /** If set to true, column text overflow will be wrapped to a new line. Otherwise, it will be truncated with an ellipsis (default: false) */
    textWrap?: boolean;
    /**
     * Determines which select mode the list is in. (default: ListSelectMode.None)
     * If 'Single' is selected, a check mark will be rendered for each row of data
     * If 'Multi' is selected, a checkbox will be rendered for the header and each row of data
     */
    selectionMode?: ListSelectMode;
    /** In multiselect mode, whether the Select All button will be displayed. When Select All button is clicked the onItemClicked button will return SELECT_ALL instead of an array of items. (default: true) */
    enableSelectAll?: boolean;
    /** Sets whether deselection should be allowed in multiselect mode when select all is enabled. This would allow the user to deselect items after select all checkbox is checked. Once an item is deselected, the list will switch to a SINGLE_ITEMS selection mode. */
    enableSelectAllDeselect?: boolean;
    /**
     * Defines whether an action button will be rendered (default: true)
     * Will not render if selectMode is not 'None'
     */
    showActionButton?: boolean | ((data: T) => boolean);
    /** Defines when the loading of the next page is triggered. The number represents the number of row left, before a load is triggered. (default: 10) */
    loadingTriggerOffset?: number;
    /** Defines how the list data should be sorted */
    defaultSortOrder?: SortData<T>;
    /**
     * When set, this function is used to generate the link that the user should be navigated to for each item.
     *
     * This property takes precedence over `onItemClicked`, which will not be executed in case `generateItemLink` is set!
     */
    generateItemLink?: (data: T) => LocationDescriptor<unknown>;
    /**
     * Raised when an data item is clicked.
     *
     * This is not being used, if generateItemLink is set!
     */
    onItemClicked?: (data: T) => void | Promise<void>;
    /** Raised when item selection has changed */
    onItemSelected?: (itemSelectEvent: ItemSelectEventArgs<T>) => void;
    /** Raised when list has scrolled down to the item indicated by loadingTriggerOffset */
    onRequestMoreData?: () => void;
    /** Callback to emit when a sort event occurs. Name of the property and order of the direction are sent back. */
    onSortChanged?: (sort: SortData<T>) => void;
    /** Callback emitted if the user clicks on the retry button which is shown when `isError` is set to true */
    onRetry?: () => void;
    /** CSS Class name for additional styles */
    className?: string;
    /** Provide inline actions which are available through '...' context menu */
    inlineMenuActions?: (data: T) => ActionData[];
    /** Function to determine if a specific row should be disabled */
    isRowDisabled?: (data: T, index: number) => boolean;
    /** Custom row renderer - if it returns null, the default ListRow will be used */
    customRowRenderer?: (props: ListRowProps<T>) => ReactElement | null;
}
/**
 * Renders various sets of data in a tabular format
 * @example
 * <List<DataInterface>
 *  columns={[{propertyName: 'id', size: '1fr', label: 'Id'}]}
 *  data={[{id: '1',desc: 'Description 1',title: 'Item 1'}]}
 *  itemClicked={(item)=> {console.log(item)}}
 * />
 */
export declare const List: <T extends Data>(props: ListProps<T> & {
    children?: React.ReactNode | undefined;
} & React.RefAttributes<ListElement>) => React.ReactElement | null;
//# sourceMappingURL=List.d.ts.map