import { WixPatternsContainer, CollectionState, FiltersMap, KeyedItem } from '@wix/bex-core';
import { ToolbarCollectionState } from './ToolbarCollectionState';
import { FoldersAndItemsCollectionsState, FoldersAndItemsCollectionsStateInitParams, PartialAllFilters } from './FoldersAndItemsCollectionsState';
import { TableState } from './TableState';
import { TableVirtualState } from './TableVirtualState';
import { ICollectionComponentState } from './ICollectionComponentState';
export interface TableFoldersStateParams<T1, F1 extends FiltersMap, T2, F2 extends FiltersMap> {
    readonly items: CollectionState<T1, F1>;
    readonly folders: CollectionState<T2, F2>;
    readonly container: WixPatternsContainer;
    readonly toolbar?: ToolbarCollectionState<T1, PartialAllFilters<F1, F2>>;
}
interface Item<T1> {
    _tag: 'item';
    originalKeyedItem: KeyedItem<T1>;
}
interface Folder<T2> {
    _tag: 'folder';
    originalKeyedItem: KeyedItem<T2>;
}
export type RowItem<T1, T2> = Item<T1> | Folder<T2>;
export type RowKeyedItem<T1, T2> = KeyedItem<RowItem<T1, T2>>;
export declare function isItemKeyedItem<T1, T2>(keyedItem: RowKeyedItem<T1, T2>): keyedItem is KeyedItem<Item<T1>>;
export declare function isFolderKeyedItem<T1, T2>(keyedItem: RowKeyedItem<T1, T2>): keyedItem is KeyedItem<Folder<T2>>;
interface TableFoldersStateInitParams extends FoldersAndItemsCollectionsStateInitParams {
}
export interface TableFoldersStatePublicAPI<T1, F1 extends FiltersMap, T2, F2 extends FiltersMap> {
    /**
     * Underlying [ToolbarCollectionState](./?path=/story/common-state--toolbarcollectionstate) instance
     */
    readonly toolbar: ToolbarCollectionState<T1, {}>;
    /**
     * Underlying [TableState](./?path=/story/base-components-collections-table-tablestate--tablestate) instance
     */
    readonly tableState: TableState<T1, {}>;
    /**
     * Underlying [CollectionState](./?path=/story/common-state--collectionstate) instances for folders and items
     */
    readonly collections: {
        readonly folders: CollectionState<T2, F2>;
        readonly items: CollectionState<T1, F1>;
    };
}
export declare class TableFoldersState<T1, F1 extends FiltersMap, T2, F2 extends FiltersMap> implements ICollectionComponentState, TableFoldersStatePublicAPI<T1, F1, T2, F2> {
    readonly container: WixPatternsContainer;
    readonly table: TableState<T1, {}>;
    readonly toolbar: ToolbarCollectionState<T1, Partial<F1 & F2>>;
    readonly virtual: TableVirtualState<RowKeyedItem<T1, T2>, T1, Partial<F1 & F2>>;
    readonly collections: FoldersAndItemsCollectionsState<T1, F1, T2, F2>;
    constructor(params: TableFoldersStateParams<T1, F1, T2, F2>);
    get showItemsSection(): boolean;
    get showFoldersSection(): boolean;
    get tableState(): TableState<T1, {}>;
    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>, Partial<F1 & F2>> | undefined;
    get showLoadingState(): boolean;
    get initTask(): import("@wix/bex-core").TaskState<unknown>;
    retryErrorState: () => void;
    get keyedItems(): RowKeyedItem<T1, T2>[];
    init(params: TableFoldersStateInitParams): () => void;
}
export {};
//# sourceMappingURL=TableFoldersState.d.ts.map