import { CollectionState, FiltersMap, KeyedItem, MultiCollectionSupport, TaskState } from '@wix/bex-core';
import { NestedCollectionNodeState } from './NestedCollectionNodeState';
import { TableColumn } from '../../model';
import { NestedTableNestedModeState } from './NestedTableNestedModeState';
import { ReactNode } from 'react';
import { NestedTableNodeStateBIReporter } from './NestedTableNodeStateBIReporter';
import { NestedTableLevelDescriptor } from './NestedTableLevelDescriptor';
import { NestedTableNodeStatePublicAPI } from './NestedTableNodeStatePublicAPI';
import { NestedTableNodeStateOptimisticActions } from './NestedTableNodeStateOptimisticActions';
export interface NestedTableDataItem<C extends string, T, F extends FiltersMap> {
    state: NestedTableNodeState<C, T, F>;
    originalKeyedItem: KeyedItem<T>;
}
export interface NestedTableSkeletonItem<C extends string, T, F extends FiltersMap> {
    state: NestedTableNodeState<C, T, F>;
    originalKeyedItem: undefined;
}
export type NestedTableItem<C extends string, T, F extends FiltersMap> = NestedTableDataItem<C, T, F> | NestedTableSkeletonItem<C, T, F>;
export type NestedTableKeyedItem<C extends string, T, F extends FiltersMap> = KeyedItem<NestedTableItem<C, T, F>>;
export type RenderMainColumn<T> = (item: T) => {
    title?: string;
    subtitle?: string;
    image?: ReactNode;
};
export type NestedTableNestColumns<C extends string, T> = Partial<Record<C, TableColumn<T>['render']>>;
export interface NestedTableNodeStateParams<C extends string, T, F extends FiltersMap> {
    readonly nestedTable: NestedTableNestedModeState<C>;
    readonly node: NestedCollectionNodeState<T, F>;
    readonly levelDescriptor: NestedTableLevelDescriptor<C, T, F>;
    readonly parentNode: NestedTableNodeState<C, any, any> | null;
    readonly parent: KeyedItem<unknown> | null;
    readonly preRegister?: boolean;
}
export declare class NestedTableNodeState<C extends string, T, F extends FiltersMap> implements NestedTableNodeStatePublicAPI<C, T, F> {
    readonly nestedTable: NestedTableNestedModeState<C>;
    readonly node: NestedCollectionNodeState<T, F>;
    readonly levelDescriptor: NestedTableLevelDescriptor<C, T, F>;
    readonly parentNode: NestedTableNodeState<C, any, any> | null;
    readonly parent: KeyedItem<unknown> | null;
    readonly bi: NestedTableNodeStateBIReporter<C, T, F>;
    readonly multi: MultiCollectionSupport<F>;
    _rowNum?: number;
    readonly initTask: TaskState<unknown>;
    readonly parentKeyToChildrenMap: Map<string, NestedTableNodeState<C, any, any>>;
    readonly parentKeyToChildrenMapAtom: import("mobx").IAtom;
    constructor(params: NestedTableNodeStateParams<C, T, F>);
    get collection(): CollectionState<T, F>;
    get unprocessedMap(): Map<string, T>;
    get children(): CollectionState<T, F>;
    get optimisticActions(): NestedTableNodeStateOptimisticActions<C, T, F>;
    get flatModeCollection(): CollectionState<T, F> | undefined;
    get depth(): number;
    get childrenDepth(): number;
    get deepestBranchDepth(): number;
    get hasExpandableItems(): boolean;
    get _childrenCount(): number;
    get _expanded(): boolean;
    get columns(): Partial<Record<C, (row: T, rowNum: number) => ReactNode>> | undefined;
    get renderMainColumn(): RenderMainColumn<T> | undefined;
    get showHoverHighlight(): boolean;
    _changeHover(hovered: boolean): void;
    get showEmptyState(): boolean;
    get showLoadingState(): boolean;
    get showErrorState(): boolean;
    get errorStatus(): import("@wix/bex-core").QueryResultStatusError<import("@wix/bex-core").DataResultKeyed<T>, unknown> | null;
    retryErrorState: () => void;
    get _isNotExpandableWhenEmpty(): boolean;
    _isExpandableActionDisabled(item: T): boolean;
    isNotExpandable(item: T): boolean;
    get _keyedItemsIfExpanded(): NestedTableKeyedItem<C, any, any>[];
    get _keyedItemsMap(): Map<string, NestedTableKeyedItem<C, any, any>>;
    get _allKeyedItemsMap(): Map<string, NestedTableKeyedItem<C, any, any>>;
    get _allKeyedItems(): NestedTableKeyedItem<C, any, any>[];
    _getKeyedItems({ onlyExpanded, }: {
        onlyExpanded?: boolean;
    }): NestedTableKeyedItem<C, any, any>[];
    get keyedItems(): NestedTableKeyedItem<C, any, any>[];
    getKeyedItem(key: string): NestedTableKeyedItem<C, any, any> | undefined;
    getDescendants<TD, FD extends FiltersMap>(): NestedTableNodeStatePublicAPI<C, TD, FD>[];
    _getNode<TD, FD extends FiltersMap>(key: string): NestedTableNodeState<C, TD, FD> | undefined;
    getParent<TD, FD extends FiltersMap>(): NestedTableNodeStatePublicAPI<C, TD, FD> | null;
    getData<TD>(): TD | null;
    toggleExpand(): void;
    get expanded(): boolean;
    getKeyedItemByIndex(ind: number): NestedTableKeyedItem<C, any, any>;
    _register(): (() => void) | undefined;
    _refreshAll(): Promise<void>;
    _toggleExpand(): Promise<void>;
    _preRegisterAll(): Promise<void>;
    _notify(): void;
    _notifyAll(): void;
    _cleanupStaleNodes(): import("mobx").IReactionDisposer;
    init({ skipCollectionInit }?: {
        skipCollectionInit?: boolean;
    }): () => void;
    createNode({ parent, notifyAll, }: {
        parent: KeyedItem<any>;
        notifyAll?: boolean;
    }): NestedTableNodeState<C, any, any> | null;
}
//# sourceMappingURL=NestedTableNodeState.d.ts.map