import { IButton } from '../Button/types';
import { IGenericObject, LoadingState } from '../../types';
import { IIcon } from '../Icon/types';
declare namespace IDataTable {
    /**
     * Config types
     */
    interface IGlobalControls {
        visible: boolean;
        minHeight?: number;
        maxHeight?: number;
        buttons?: Array<IButton.IProps & {
            align: 'Start' | 'End';
            text: string;
            action: GlobalControlsEvent | RowControlsEvent;
        }>;
        search?: boolean;
        searchType?: 'Frontend' | 'Backend';
    }
    interface IRowControls {
        visible: boolean;
        sendMethod?: 'GET' | 'POST' | 'PUT' | 'PATCH';
        sendToEndpoint?: string;
        sendOnBlur?: boolean;
        buttons?: Array<IButton.IProps & {
            text: string;
            action: RowControlsEvent;
        }>;
    }
    interface IFooterControls {
        visible: boolean;
        rowCount?: boolean | number;
        pagination?: {
            pageLimit?: 5 | 10 | 15 | 20 | 50 | 100;
            backend?: boolean;
        };
    }
    interface IColumnConfig {
        id: string;
        name: string;
        resizable?: boolean;
        visible: boolean;
        sortable?: boolean;
        defaultWidth?: number;
        searchable?: boolean;
        displayOrder: number;
        checkbox?: boolean;
    }
    interface IRowConfig {
        visible?: boolean;
        id: string;
        buttonCopyRow?: boolean;
        buttonDeleteRow?: boolean;
        buttonLockRow?: boolean;
        buttonLoadPage?: boolean;
    }
    interface ICellConfig {
        _uid?: string;
        id: string;
        type?: 'text' | 'number' | 'search' | 'select' | 'string' | 'date' | 'checkbox' | 'button' | 'link';
        text?: string;
        variant?: 'Primary' | 'Secondary' | 'Tertiary' | 'Inverse';
        size?: 'XSmall' | 'Small' | 'Medium' | 'Large';
        placeholder?: string;
        multi?: boolean;
        required?: boolean;
        minLength?: number;
        maxLength?: number;
        minValue?: number;
        maxValue?: number;
        step?: number;
        pattern?: string;
        locked?: boolean;
        displayOrder?: number;
        disabled?: boolean;
        ignoreTab?: boolean;
        includeInObject?: boolean;
        sendOnBlur?: boolean;
        sendOnChange?: boolean;
        sendOnWait?: boolean;
        sendOnTrigger?: boolean;
        sendOnClick?: boolean;
        sendMethod?: 'GET' | 'POST' | 'PUT' | 'PATCH';
        sendToEndpoint?: string;
        triggerInputs?: boolean;
        triggerUpdate?: string[];
        responseValue?: any;
        responseLabel?: any;
        searchable?: boolean;
        filterable?: boolean;
        options?: Array<{
            [key: string]: any;
        }>;
        icon?: IIcon.IProps;
        dateFormat?: string;
        showTimeSelect?: boolean;
        timeIntervals?: number;
    }
    /**
     * Prop types
     */
    type GlobalEvent = GlobalControlsEvent | RowControlsEvent | FooterControlsEvent | HeaderEvent | RowEvent | CellEvent | 'SYNC' | 'SUBMIT';
    type GlobalControlsEvent = 'FILTER' | 'SEARCH' | 'CUSTOMISE' | 'CUSTOM_ACTION';
    type RowControlsEvent = 'ADD_ROW' | 'COPY_ROW' | 'DELETE_ROW' | 'LOCK_ROW' | 'LINK' | 'EDIT';
    type FooterControlsEvent = 'PREV_PAGE' | 'NEXT_PAGE';
    type HeaderEvent = 'SORT';
    type RowEvent = 'ROW_CHANGE' | 'ROW_BLUR';
    type CellEvent = 'CELL_BLUR' | 'CELL_CHANGE' | 'CELL_TRIGGER' | 'CELL_WAIT' | 'CELL_SEARCH' | 'CELL_CLICK' | 'HEADER_CHECKBOX' | 'RECORDS_PER_PAGE' | 'CURRENT_PAGE';
    type EventDispatcher = (value: {
        type: GlobalEvent;
        payload?: any;
    }) => void;
    interface IProps {
        className?: string;
        type: 'standard' | 'form';
        loadingState?: LoadingState;
        controls: {
            global: IGlobalControls;
            row: IRowControls;
            footer: IFooterControls;
        };
        header: IColumnConfig[];
        rows: ICellConfig[][];
        data: IGenericObject[];
        totalRows?: number;
        onEvent?: EventDispatcher;
    }
    interface IControlsProps {
        header: IColumnConfig[];
        controls: IGlobalControls;
        onEvent?: EventDispatcher;
    }
    interface IHeaderProps {
        columns: IColumnConfig[];
        showRowControls?: boolean;
        onEvent?: EventDispatcher;
    }
    interface IRowProps {
        controls: IRowControls;
        columns: IColumnConfig[];
        cells: ICellConfig[];
        data: any;
        tableType: 'standard' | 'form';
        onEvent?: EventDispatcher;
    }
    interface ICellProps {
        _uid: string;
        id: string;
        value?: any;
        triggerValue?: any;
        index?: number;
        config: ICellConfig;
        tableType: 'standard' | 'form';
        onEvent?: EventDispatcher;
        onChange: any;
    }
    interface IFooterProps {
        [key: string]: any;
        onEvent?: EventDispatcher;
    }
}
export { IDataTable };
