import { CreateManyParams, DeepPartial, DeleteManyParams, FiltersMap, OptimisticActions, ToastConfig, UpdateAllParams, UpdateManyParams } from '@wix/bex-core';
import { NestedTableNodeState } from './NestedTableNodeState';
import { NestedTableNodeStatePublicAPI } from './NestedTableNodeStatePublicAPI';
export interface NestedDeleteManyParams<T, R> extends DeleteManyParams<T, R> {
}
export interface NestedUpdateManyParams<T, R> extends UpdateManyParams<T, R> {
    /**
     * Indicates whether to propagate the update to child nodes.
     */
    propagate?: boolean;
    /**
     * Partial data to patch the items with.
     */
    patch?: DeepPartial<T>;
}
export interface NestedTableNodeStateOptimisticActionsPublicAPI<T> extends OptimisticActions<T> {
    /**
     * Updates multiple items
     * @param items - The items to update.
     * @param params - Additional parameters for the update operation.
     * @param params.propagate - Indicates whether to propagate the update children nodes
     * @param params.patch - Partial data to patch the items with.
     */
    updateMany<R>(items: T[], params: NestedUpdateManyParams<T, R>): void;
    /**
     * Updates one item
     * @param item - The items to update.
     * @param params - Additional parameters for the update operation.
     * @param params.propagate - Indicates whether to propagate the update children nodes
     * @param params.patch - Partial data to patch the items with.
     */
    updateOne<R>(item: T, params: NestedUpdateManyParams<T, R>): void;
    /**
     * Deletes multiple items and their descendants
     * @param items - An array of items to delete.
     * @param params - Additional parameters for the delete operation.
     */
    deleteMany<R>(items: T[], params: NestedDeleteManyParams<T, R>): void;
    /**
     * Deletes one item and its descendants
     * @param item - An array of items to delete.
     * @param params - Additional parameters for the delete operation.
     */
    deleteOne<R>(item: T, params: NestedDeleteManyParams<T, R>): void;
}
interface BaseActionParams {
    submit: (...args: any) => any;
    successToast?: ToastConfig | string;
    errorToast?: (err: unknown, params: {
        retry: () => void;
    }) => ToastConfig | string;
}
export declare class NestedTableNodeStateOptimisticActions<C extends string, T, F extends FiltersMap> implements NestedTableNodeStateOptimisticActionsPublicAPI<T> {
    readonly node: NestedTableNodeState<C, T, F>;
    constructor(node: NestedTableNodeState<C, T, F>);
    _getActionsParams<A extends BaseActionParams>(params: A): {
        primaryActionParams: A & {
            submit: (...args: any) => any;
        };
        secondaryActionParams: A & {
            successToast: undefined;
            errorToast: undefined;
            submit: (...args: any) => any;
        };
    };
    _runAction<A extends BaseActionParams>(action: (optimisticActions: OptimisticActions<T>, params: A) => void, params: A): void;
    _propagate(items: T[], action: (nodes: NestedTableNodeStatePublicAPI<C, any, any>, subItems: T[]) => void): void;
    createOne(item: T, params: CreateManyParams<T>): void;
    createMany(items: T[], params: CreateManyParams<T>): void;
    updateAll<R>(patchOrFn: (item: T) => Partial<T>, params: UpdateAllParams<R>): void;
    deleteMany<R>(items: T[], params: NestedDeleteManyParams<T, R>): void;
    deleteOne<R>(item: T, params: NestedDeleteManyParams<T, R>): void;
    deleteAll<R>(params: UpdateAllParams<R>): void;
    updateMany<R>(items: T[], params: NestedUpdateManyParams<T, R>): void;
    updateOne<R>(item: T, params: NestedUpdateManyParams<T, R>): void;
}
export {};
//# sourceMappingURL=NestedTableNodeStateOptimisticActions.d.ts.map