import { ConditionalModalState, FiltersMap, ShowToast, Tags } from '@wix/bex-core';
import { TagsBulkAssignPopoverState, TagsBulkAssignPopoverStateParams } from './TagsBulkAssignPopoverState';
import { BulkActionModalRenderPropParams } from '../components/BulkAction';
import { AsyncJob } from '@wix/bex-utils/@wix/ambassador-infra-asyncjobs-v1-async-job/types';
export declare const POLL_DELAY = 500;
export declare const MILLIS_FOR_SHOWING_SUCCESS = 1000;
export declare const MAX_JOB_RETRIES_COUNT = 4;
export interface AsyncBulkUpdateTagsParams<T, F extends FiltersMap> extends Pick<BulkActionModalRenderPropParams<T, F>, 'allSelected' | 'selectedValues' | 'uncheckedValues' | 'query'> {
    assignTags: Tags;
    unassignTags: Tags;
}
export interface TagsBulkAssignAsyncStateParams<T, F extends FiltersMap> extends Pick<TagsBulkAssignPopoverStateParams<T, F>, 'asyncBulkUpdateTags' | 'collectionState'> {
    container: TagsBulkAssignPopoverState<T, F>['container'];
    optimisticActions: TagsBulkAssignPopoverState<T, F>['optimisticActions'];
    tagsBIReporter: TagsBulkAssignPopoverState<T, F>['tagsBIReporter'];
}
export declare class TagsBulkAssignAsyncState<T, F extends FiltersMap> {
    readonly collectionState: import("@wix/bex-core").CollectionState<T, F>;
    readonly optimisticActions: import("@wix/bex-core").CollectionOptimisticActions<T, F>;
    readonly container: import("@wix/bex-core").WixPatternsContainer;
    readonly tagsBIReporter: import("@wix/bex-core").TagsBIReporter;
    readonly asyncBulkUpdateTags: ((params: AsyncBulkUpdateTagsParams<T, F>) => Promise<{
        jobId: string;
    }>) | undefined;
    readonly asyncJobProgressModalState: ConditionalModalState<unknown>;
    job: AsyncJob | null;
    timeout?: number;
    isDuringApplyChanges: boolean;
    currentInvocationParams: AsyncBulkUpdateTagsParams<T, F> | null;
    updatingTagsToast: ReturnType<ShowToast> | null;
    getJobRetriesCount: number;
    constructor(params: TagsBulkAssignAsyncStateParams<T, F>);
    init(): () => void;
    applyChanges({ newAssignedTagIds, newUnassignedTagIds, }: {
        newAssignedTagIds: string[];
        newUnassignedTagIds: string[];
    }): Promise<void>;
    triggerBulkAssign(params: AsyncBulkUpdateTagsParams<T, F>): Promise<void>;
    startTagUpdateProcess(params: AsyncBulkUpdateTagsParams<T, F>): Promise<void>;
    pollJobStatus(jobId: string): Promise<void>;
    handlePollingError(error: unknown): void;
    fetchJobStatus(jobId: string): Promise<AsyncJob | null>;
    scheduleNextPoll(jobId: string): void;
    handleJobEnd(): void;
    scheduleJobCompletionHandling(): void;
    handleJobSuccess(lastInvocationParams: AsyncBulkUpdateTagsParams<T, F> | null): void;
    resetStateParams(): void;
    showPartialFailureToast({ failCount, lastInvocationParams, }: {
        failCount: number;
        lastInvocationParams: AsyncBulkUpdateTagsParams<T, F> | null;
    }): void;
    showJobCompletedSuccessfullyToast(): void;
    showFailToCreateJobToast(error: unknown): void;
    showFailedToPollToast(error: unknown): void;
    refreshCollection(): void;
    openAsyncJobProgressModal: () => void;
    closeAsyncJobProgressModal: () => void;
    get isJobCompleted(): boolean;
    get isJobFailed(): boolean;
    get isJobEnded(): boolean;
    get isJobInProgress(): boolean;
    get canBulkAssignAsync(): boolean;
    get updatedItemsPercentage(): number;
}
//# sourceMappingURL=TagsBulkAssignAsyncState.d.ts.map