import { CollectionState, FiltersMap, SortOrder, WixPatternsContainer } from '@wix/bex-core';
import { ToolbarCollectionState, ToolbarCollectionStateParamsInitParams } from './ToolbarCollectionState';
import { TableVirtualState } from './TableVirtualState';
import { DragAndDropState } from '../components/DragAndDrop';
import { ICollectionComponentState } from './ICollectionComponentState';
import { LoadingRowState } from '../components/LoadingRow/LoadingRowState';
export interface TableStateParams<T, F extends FiltersMap> {
    readonly collection: CollectionState<T, F>;
    readonly container: WixPatternsContainer;
    readonly toolbar?: ToolbarCollectionState<T, F>;
}
interface TableDragAndDropStateBase<T, F extends FiltersMap> {
    getStickyColumnsCount: (params: {
        stickyColumns: number;
    }) => number;
    init: () => void;
    dnd: DragAndDropState<T, F>;
}
export interface TableStateInitParams extends ToolbarCollectionStateParamsInitParams {
    hasMultiLevelSorting?: boolean;
}
export interface TableStatePublicAPI<T, F extends FiltersMap> {
    /**
     * Underlying [CollectionState](./?path=/story/common-state--collectionstate) instance
     * @external
     */
    readonly collection: CollectionState<T, F>;
    /**
     * Underlying [ToolbarCollectionState](./?path=/story/common-state--toolbarcollectionstate) instance
     * @external
     */
    readonly toolbar: ToolbarCollectionState<T, F>;
    /**
     * Reset active filters & sorting and adds new items to the collection.
     * @external
     * @param items - new items to add to the collection
     */
    onAddItemActionComplete(items: T[]): void;
    /**
     * Visible columns as selected via [CustomColumns](./?path=/story/features-display--customcolumns)
     * @external
     */
    readonly visibleColumns: {
        id: string;
    }[];
    /**
     * Sorts the collection by a specified column and optional sort direction.
     * @external
     */
    sort: (columnId: string, params: {
        forceDirection?: SortOrder;
    }) => void;
}
export declare class TableState<T, F extends FiltersMap> implements ICollectionComponentState, TableStatePublicAPI<T, F> {
    readonly toolbar: ToolbarCollectionState<T, F>;
    readonly virtual: TableVirtualState<import("@wix/bex-core").KeyedItem<T>, T, F>;
    readonly loadingRowState: LoadingRowState;
    tableDragAndDropState: TableDragAndDropStateBase<T, F> | null;
    constructor(params: TableStateParams<T, F>);
    get visibleColumns(): import("..").Column[];
    get table(): ToolbarCollectionState<T, F>;
    get collection(): CollectionState<T, F>;
    get tableState(): this;
    get itemsContentWidth(): number;
    get itemsToRenderCount(): number;
    init(params: TableStateInitParams): () => void;
    get keyedItems(): import("@wix/bex-core").KeyedItem<T>[];
    getStickyColumnsCount(params: {
        stickyColumns?: number;
        horizontalScroll?: boolean;
        showSelection?: boolean;
        stickySelectionColumn?: boolean;
    }): number | undefined;
    get showEmptyState(): boolean;
    get hasAvailableItems(): boolean;
    get resultOriginQuerySearch(): string | undefined;
    get hasNonPersistentActiveFilters(): boolean;
    get showErrorState(): boolean;
    get errorStatus(): import("@wix/bex-core").QueryResultStatusError<import("@wix/bex-core").DataResultKeyed<unknown>, F> | undefined;
    get showLoadingState(): boolean;
    get initTask(): import("@wix/bex-core").TaskState<unknown>;
    retryErrorState: () => void;
    onAddItemActionComplete: (items: T[]) => Promise<void>;
    sort: (columnId: string, { forceDirection }?: {
        forceDirection?: SortOrder | undefined;
    }) => void;
}
export {};
//# sourceMappingURL=TableState.d.ts.map