import { IColumnDefinitionContainer } from '../../types/query';
import { IApiPayload, IDataFetcher, IDataTableQuery } from '../../services/api/api.models';
import { ITable, IAction, ITableOptions, IIsMultiSortEvent } from './models/table';
import { Column, IColumnOption } from './models/column';
import { ITenantAttributeScope } from '../../services/api/DataHub/Scopes';
import { ITenantAttributeLanguage } from '../../services/api/DataHub/Languages';
import { SORT_TYPE, ROW_SELECTION } from './constants';

/**
 * Actindo Data Table properties
 * @interface
 * @template T
 * @property {string | T[] | IDataFetcher<T>} data - Table data source
 * @property {object} [customQuery] - Additional query, will be sent on every request
 * @property {boolean} [isLoading] - Should not show table component
 * @property {boolean} [isRowClickable] - Should show cursor pointer on row
 * @property {ROW_SELECTION} [rowSelection] - Row selection type
 * @property {IColumnOption[]} columns - Column configuration array
 * @property {Partial<IColumnOption>} [defaultColumn] - Common column configuration, will be added to every column
 * @property {string[]} [columnsOrder] - Ordered list of columns IDs
 * @property {SORT_TYPE} [sortType] - Sorting type (blocked/by single column/by multi columns)
 * @property {IIsMultiSortEvent} [isMultiSortEvent='shift + click'] - Determines whether the current event trigger a multi-sorting (hold 'shift' key by default)
 * @property {string} [tableName] - Table title
 * @property {string} [gridId] - Name of table preset
 * @property {boolean} [hasSplitView] - Show split view control
 * @property {boolean} [hideGlobalSearch] - Don't show global search input
 * @property {boolean} [hideFilters] - Don't show column filters
 * @property {boolean} [hideColumnCustomization] - Don't show columns list, don't allow to change columns order
 * @property {IAction[]|boolean} [createActions] - Menu item for `Create new row` button
 * @property {boolean} [hidePagination] - Don't show pagination
 * @property {number} [pageSize] - Amount of rows per page
 * @property {boolean|number[]} [pageSizes] - Allow to change page size
 */
interface IActindoDataTableProps<T extends object = object> extends ITableOptions<T> {
    /**
     * Table data source
     * @example { data: "Actindo.CoreModules.Auth.User.listKeys" } - use HttpApi.getDataTable to fetch data
     * @example { data: [{}, ...] } - offline data
     * @example { data: <T>(query: IDataTableQuery) => Promise<IDataFetcherResponse<T>> } - use this function to fetch data
     * @required
     */
    data: string | T[] | IDataFetcher<T>;
    /** Additional query, will be sent on every request */
    customQuery?: Record<string, unknown>;
    /** Expect exact number of rows in response */
    exactRowCount?: boolean;
    /** External flag - should not show table component */
    isLoading?: boolean;
    /** will be passed to actions panel */
    disableActions?: boolean;
    /** External flag - don't fetch new data */
    freeze?: boolean;
    /** Should show cursor pointer on row */
    isRowClickable?: boolean;
    /**
     * Row selection type:
     * ROW_SELECTION.NONE - hide row checkboxes
     * ROW_SELECTION.SINGLE - select only single row at once
     * ROW_SELECTION.MULTI - select any amount of rows at once
     *  */
    rowSelection?: ROW_SELECTION;
    /** Selection persist across multi pages */
    persistentSelection?: boolean;
    /** Disable selection of the row it that field contains true  */
    lockedProperty?: string;
    rowHeight?: string;
    minRowHeight?: string;
    /**
     * Column configuration array
     * @required
     * */
    columns: IColumnOption[];
    /** Entity type for dynamic columns */
    entityTypeClassName?: string;
    /** Method to fetch dynamic columns list */
    dynamicColumnsEndpoint?: string | ((query?: unknown) => Promise<IApiPayload<IColumnDefinitionContainer[]>>);
    /** Common column configuration, will be added to every column */
    defaultColumn?: Partial<IColumnOption>;
    /** Ordered list of columns IDs */
    columnsOrder?: string[];
    /** Sorting type (blocked/by single column/by multi columns) */
    sortType?: SORT_TYPE;
    /** Determines whether the current event should trigger a multi-sorting */
    isMultiSortEvent?: IIsMultiSortEvent;
    /**
     * Menu items for `Actions Bar`
     * @example { tableActions: [{}, ...] } - show actions buttons/menus and emit selected event
     */
    tableActions?: IAction[];
    /** Table title */
    tableName?: string;
    /** Preset ID */
    gridId?: string;
    /** Hide Channel and Language controls */
    channels?: ITenantAttributeScope[] | boolean;
    languages?: ITenantAttributeLanguage[] | boolean;
    /** Show split view control */
    hasSplitView?: boolean;
    /** Don't show global search input */
    hideGlobalSearch?: boolean;
    /** Don't show column filters */
    hideFilters?: boolean;
    /** Don't show columns list, don't allow to change columns order */
    hideColumnCustomization?: boolean;
    /**
     * Menu items for `Create new row` button
     * @example { createActions: false } - hide `Create new row` button
     * @example { createActions: undefined } - hide `Create new row` button
     * @example { createActions: [] } - hide `Create new row` button
     * @example { createActions: [{}] } - show only `Create new row` button and emit this event immediately on button click
     * @example { createActions: [{}, ...] } - show actions menu and emit selected event
     */
    createActions?: IAction[] | boolean;
    /** Don't show pagination */
    hidePagination?: boolean;
    /** Amount of rows per page */
    pageSize?: number;
    /**
     * Allow to choose page size
     * @example { pageSizes: true } - show default page size list (PAGE_SIZES)
     * @example { pageSizes: [10, ...] } - show specified page sizes list
     *  */
    pageSizes?: boolean | number[];
    /** should use router for details navigation */
    routable?: string | boolean;
    /** name of the ID field in the route.params (rowId by default) */
    routableId?: string;
    /** selector for details teleport */
    detailsTarget?: string;
    /** name of the field with id for routing */
    rowIdName?: string;
    /** should not hide table in detail view */
    modalDetails?: boolean;
    hideRemove?: boolean;
    canReorderHeaders?: boolean;
    refreshText?: string;
    hideNoData?: boolean;
    hideNoDataTitle?: boolean;
    hideNoDataDescription?: boolean;
    hideNoDataComment?: boolean;
    transparent?: boolean;
    virtualScroll?: boolean;
    getDetailsApi?: boolean | string | ((query: {
        id: number | string;
    }) => Promise<T>);
    forceDetailsFetch?: boolean;
}
declare function __VLS_template(): Readonly<{
    [slotName: `header-${string}`]: (props: {
        name: string;
        column: Column;
        headerValue: string;
    }) => void;
    [slotName: `cell-${string}`]: (props: {
        row: object;
        rowIndex: number;
        cell: Column;
        cellValue: string;
    }) => void;
    "split-details"?: (props: {
        rowId: number | string;
        row: object;
    }) => void;
    "split-row"?: (props: {
        rowIndex: number;
        row: object;
        isSelected: boolean;
    }) => void;
    "split-title"?: (props: {
        rowId: number | string;
        row: object;
    }) => void;
    "split-actions"?: (props: {
        table: ITable;
        disabled: boolean;
        row: object;
    }) => void;
    filters?: (props: {
        table: ITable;
        disabled: boolean;
    }) => void;
    actionButtons?: (props: {
        table: ITable;
        disabled: boolean;
    }) => void;
    globalActions?: (props: {
        table: ITable;
        disabled: boolean;
    }) => void;
    extraActions?: () => void;
    rowDisabled?: () => void;
    details?: (props: {
        rowId: number | string;
        row: object;
        close: (reload?: boolean) => void;
        loading: boolean;
    }) => void;
    modals?: () => void;
    "no-data-title"?: () => void;
    "no-data-description"?: () => void;
    "no-data-comment"?: () => void;
    row?: (props: {
        colspan: number;
        headers: Column[];
        rowIndex: number;
        row: object;
        rowSelection: ROW_SELECTION;
        isAllSelected: boolean;
        isSelected: boolean;
        singleSelection: (value: unknown) => void;
        changeSelection: (value: unknown) => void;
    }) => void;
}> & {
    [slotName: `header-${string}`]: (props: {
        name: string;
        column: Column;
        headerValue: string;
    }) => void;
    [slotName: `cell-${string}`]: (props: {
        row: object;
        rowIndex: number;
        cell: Column;
        cellValue: string;
    }) => void;
    "split-details"?: (props: {
        rowId: number | string;
        row: object;
    }) => void;
    "split-row"?: (props: {
        rowIndex: number;
        row: object;
        isSelected: boolean;
    }) => void;
    "split-title"?: (props: {
        rowId: number | string;
        row: object;
    }) => void;
    "split-actions"?: (props: {
        table: ITable;
        disabled: boolean;
        row: object;
    }) => void;
    filters?: (props: {
        table: ITable;
        disabled: boolean;
    }) => void;
    actionButtons?: (props: {
        table: ITable;
        disabled: boolean;
    }) => void;
    globalActions?: (props: {
        table: ITable;
        disabled: boolean;
    }) => void;
    extraActions?: () => void;
    rowDisabled?: () => void;
    details?: (props: {
        rowId: number | string;
        row: object;
        close: (reload?: boolean) => void;
        loading: boolean;
    }) => void;
    modals?: () => void;
    "no-data-title"?: () => void;
    "no-data-description"?: () => void;
    "no-data-comment"?: () => void;
    row?: (props: {
        colspan: number;
        headers: Column[];
        rowIndex: number;
        row: object;
        rowSelection: ROW_SELECTION;
        isAllSelected: boolean;
        isSelected: boolean;
        singleSelection: (value: unknown) => void;
        changeSelection: (value: unknown) => void;
    }) => void;
};
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IActindoDataTableProps<object>>, {
    customQuery: any;
    exactRowCount: boolean;
    isLoading: boolean;
    disableActions: boolean;
    freeze: boolean;
    isRowClickable: boolean;
    rowSelection: ROW_SELECTION;
    persistentSelection: boolean;
    lockedProperty: any;
    rowHeight: string;
    minRowHeight: string;
    entityTypeClassName: string;
    dynamicColumnsEndpoint: any;
    defaultColumn: () => {};
    columnsOrder: any;
    sortType: SORT_TYPE;
    isMultiSortEvent: any;
    tableName: any;
    gridId: any;
    channels: boolean;
    languages: boolean;
    hasSplitView: boolean;
    hideGlobalSearch: boolean;
    hideFilters: boolean;
    hideColumnCustomization: boolean;
    createActions: boolean;
    hidePagination: boolean;
    pageSize: number;
    pageSizes: () => number[];
    tableActions: () => any[];
    routable: boolean;
    routableId: string;
    detailsTarget: string;
    rowIdName: string;
    modalDetails: boolean;
    hideRemove: boolean;
    canReorderHeaders: boolean;
    refreshText: any;
    hideNoData: boolean;
    hideNoDataTitle: boolean;
    hideNoDataDescription: boolean;
    hideNoDataComment: boolean;
    transparent: boolean;
    virtualScroll: boolean;
    getDetailsApi: boolean;
    forceDetailsFetch: boolean;
}>>, {
    table: ITable;
    reloadTable: () => void;
    clearSelection: () => void;
    prepareDataRequestPayload: () => object;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
    create: (eventName: string) => void;
    action: (eventName: string, selectedRows: Record<string, any>[]) => void;
    "clicked-row": (selectedRow: Record<string, any>) => void;
    "dbl-clicked-row": (selectedRow: Record<string, any>) => void;
    detail: (isVisible: boolean) => void;
    "update-width": (width: number, header: Column<Record<string, any>>) => void;
    "update:data": (newRows: object[]) => void;
    refresh: () => void;
    recalculate: (query: IDataTableQuery) => void;
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IActindoDataTableProps<object>>, {
    customQuery: any;
    exactRowCount: boolean;
    isLoading: boolean;
    disableActions: boolean;
    freeze: boolean;
    isRowClickable: boolean;
    rowSelection: ROW_SELECTION;
    persistentSelection: boolean;
    lockedProperty: any;
    rowHeight: string;
    minRowHeight: string;
    entityTypeClassName: string;
    dynamicColumnsEndpoint: any;
    defaultColumn: () => {};
    columnsOrder: any;
    sortType: SORT_TYPE;
    isMultiSortEvent: any;
    tableName: any;
    gridId: any;
    channels: boolean;
    languages: boolean;
    hasSplitView: boolean;
    hideGlobalSearch: boolean;
    hideFilters: boolean;
    hideColumnCustomization: boolean;
    createActions: boolean;
    hidePagination: boolean;
    pageSize: number;
    pageSizes: () => number[];
    tableActions: () => any[];
    routable: boolean;
    routableId: string;
    detailsTarget: string;
    rowIdName: string;
    modalDetails: boolean;
    hideRemove: boolean;
    canReorderHeaders: boolean;
    refreshText: any;
    hideNoData: boolean;
    hideNoDataTitle: boolean;
    hideNoDataDescription: boolean;
    hideNoDataComment: boolean;
    transparent: boolean;
    virtualScroll: boolean;
    getDetailsApi: boolean;
    forceDetailsFetch: boolean;
}>>> & Readonly<{
    onAction?: (eventName: string, selectedRows: Record<string, any>[]) => any;
    onCreate?: (eventName: string) => any;
    "onUpdate:data"?: (newRows: object[]) => any;
    onRefresh?: () => any;
    onRecalculate?: (query: IDataTableQuery) => any;
    "onClicked-row"?: (selectedRow: Record<string, any>) => any;
    "onDbl-clicked-row"?: (selectedRow: Record<string, any>) => any;
    "onUpdate-width"?: (width: number, header: Column<Record<string, any>>) => any;
    onDetail?: (isVisible: boolean) => any;
}>, {
    transparent: boolean;
    hideNoData: boolean;
    freeze: boolean;
    pageSize: number;
    customQuery: Record<string, unknown>;
    isLoading: boolean;
    createActions: IAction[] | boolean;
    virtualScroll: boolean;
    exactRowCount: boolean;
    isRowClickable: boolean;
    persistentSelection: boolean;
    disableActions: boolean;
    entityTypeClassName: string;
    dynamicColumnsEndpoint: string | ((query?: unknown) => Promise<IApiPayload<IColumnDefinitionContainer[]>>);
    defaultColumn: Partial<IColumnOption>;
    columnsOrder: string[];
    sortType: SORT_TYPE;
    isMultiSortEvent: IIsMultiSortEvent;
    gridId: string;
    channels: ITenantAttributeScope[] | boolean;
    languages: ITenantAttributeLanguage[] | boolean;
    hideGlobalSearch: boolean;
    hideFilters: boolean;
    hideColumnCustomization: boolean;
    rowIdName: string;
    rowHeight: string;
    minRowHeight: string;
    hidePagination: boolean;
    tableActions: IAction[];
    hideRemove: boolean;
    rowSelection: ROW_SELECTION;
    hideNoDataTitle: boolean;
    hideNoDataDescription: boolean;
    hideNoDataComment: boolean;
    getDetailsApi: string | boolean | ((query: {
        id: number | string;
    }) => Promise<object>);
    forceDetailsFetch: boolean;
    routable: string | boolean;
    routableId: string;
    detailsTarget: string;
    tableName: string;
    hasSplitView: boolean;
    refreshText: string;
    pageSizes: boolean | number[];
    canReorderHeaders: boolean;
    lockedProperty: string;
    modalDetails: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
export default _default;
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
type __VLS_TypePropsToRuntimeProps<T> = {
    [K in keyof T]-?: {} extends Pick<T, K> ? {
        type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
    } : {
        type: import('vue').PropType<T[K]>;
        required: true;
    };
};
type __VLS_WithDefaults<P, D> = {
    [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
        default: D[K];
    }> : P[K];
};
type __VLS_Prettify<T> = {
    [K in keyof T]: T[K];
} & {};
type __VLS_WithTemplateSlots<T, S> = T & {
    new (): {
        $slots: S;
    };
};
