import { CollectionOptimisticActions, CollectionState, ConditionalModalState, FiltersMap, SortOrder, WixPatternsContainer } from '@wix/bex-core';
import type { MessageModalLayoutProps } from '@wix/design-system';
import type { KeyedItem } from '@wix/bex-core';
import { ToolbarCollectionState } from '../ToolbarCollectionState';
import { TableState } from '../TableState';
import { ICollectionComponentState } from '../ICollectionComponentState';
import { CellInteractionState } from './CellInteractionState';
import { CellValueState } from './CellValueState';
import { ClipboardState } from './ClipboardState';
import { MutationState } from './MutationState';
import { FieldActionsState } from '../FieldActionsState';
import type { EditableTableMutationHandlers } from './MutationState';
import type { Cell, CellType, EditableColumn, ValidationResult } from './types';
import type { FieldActions } from '../../types/SchemaConfig';
import type { FieldActionPermissions } from '../../components/FieldActions';
export type EditableTableFieldActionsPermissions = FieldActionPermissions;
export interface EditableTablePermissions {
    addItemDisabled?: boolean;
    updateItemDisabled?: boolean;
    removeItemDisabled?: boolean;
    fieldActions?: EditableTableFieldActionsPermissions;
}
export interface EditableTableStateParams<T, F extends FiltersMap> {
    readonly collection: CollectionState<T, F>;
    readonly container: WixPatternsContainer;
    readonly toolbar?: ToolbarCollectionState<T, F>;
    readonly permissions?: EditableTablePermissions;
    readonly mutations: EditableTableMutationHandlers<T>;
    readonly fieldActions?: FieldActions;
    readonly refresh?: () => Promise<void>;
    readonly createOptimisticActions: (collection: CollectionState<T, F>) => CollectionOptimisticActions<T, F>;
    /**
     * Additional cell types to register alongside the built-in ones.
     * Augment `CellTypeConfigMap` to use these types on `EditableColumn.cellType`.
     */
    readonly extraCellTypes?: CellType[];
}
export interface EditableTableStatePublicAPI<T, F extends FiltersMap> {
    /** Underlying CollectionState instance */
    readonly collection: CollectionState<T, F>;
    /** Underlying ToolbarCollectionState instance */
    readonly toolbar: ToolbarCollectionState<T, F>;
    /** Reset active filters & sorting and adds new items to the collection */
    onAddItemActionComplete(items: T[]): void;
    /** Sort by column */
    sort: (columnId: string, params?: {
        forceDirection?: SortOrder;
        multiple?: boolean;
    }) => void;
}
export declare class EditableTableState<T, F extends FiltersMap> implements ICollectionComponentState, EditableTableStatePublicAPI<T, F> {
    readonly toolbar: ToolbarCollectionState<T, F>;
    readonly tableState: TableState<T, F>;
    readonly cellInteraction: CellInteractionState<T, F>;
    readonly cellValue: CellValueState<T, F>;
    readonly clipboard: ClipboardState<T, F>;
    readonly mutation: MutationState<T, F>;
    readonly deleteConfirmModal: ConditionalModalState<Partial<MessageModalLayoutProps>>;
    readonly fieldActions: FieldActionsState;
    addItemDisabled: boolean;
    updateItemDisabled: boolean;
    removeItemDisabled: boolean;
    _allColumns: EditableColumn<T>[];
    constructor(params: EditableTableStateParams<T, F>);
    get collection(): CollectionState<T, F>;
    get keyedItems(): KeyedItem<T>[];
    get visibleColumns(): import("../..").Column[];
    get itemsToRenderCount(): number;
    get _columnMap(): Map<string, EditableColumn<T>>;
    _getKeyedItem(key: string): KeyedItem<T> | undefined | null;
    _toIndices(pos: Cell): {
        row: number;
        col: number;
    } | null;
    _toPosition(row: number, col: number): Cell | null;
    onAddItemActionComplete: (items: T[]) => Promise<void>;
    onAddItemClick: (origin?: string) => void;
    get editableColumns(): EditableColumn<T>[];
    init(columns: EditableColumn<T>[]): () => void;
    addItem(afterItemKey?: string): string;
    duplicateItem(rowKey: string): void;
    deleteItems(rowKeys: string[]): void;
    confirmDeleteItems(rowKeys: string[]): void;
    resolveCellTypeByColumnId(columnId: string): CellType;
    getCellDisplayValue(rowKey: string, columnId: string): any;
    getCellValidation(rowKey: string, columnId: string): ValidationResult;
    isCellEditable(rowKey: string, columnId: string): boolean;
    clearCells(cells: Cell[]): void;
    handleCellClick(rowKey: string, columnId: string, shiftKey: boolean): void;
    handleCellDoubleClick(rowKey: string, columnId: string): void;
    sort: (columnId: string, { forceDirection, multiple, }?: {
        forceDirection?: SortOrder | undefined;
        multiple?: boolean | undefined;
    }) => void;
}
//# sourceMappingURL=EditableTableState.d.ts.map