import { Tag } from '@wix/bex-utils/@wix/ambassador-os-tags-v1-tag/types';
import { TagsManagementState } from './TagsManagementState';
import { TagsBIReporter } from './TagsBIReporter';
import { Tags } from './tagsTypes';
import { Fqdn } from '../../model';
import { CollectionOptimisticActions } from '../CollectionOptimisticActions';
import { TaskState } from '../TaskState';
import { CollectionState } from '../CollectionState';
import { CreateManyParams, DeleteManyParams } from '../OptimisticActions';
export type OnSubmitTagsFuncType = ({ allTags, addedTags, removedTags, }: {
    allTags: Tags;
    addedTags: Tags;
    removedTags: Tags;
}) => void;
export interface TagsAssignmentStateParams {
    readonly tagsManagementState: TagsManagementState;
    readonly entityId?: string;
    readonly origin: string;
    readonly fqdn: Fqdn;
    readonly tagsBIReporter: TagsBIReporter;
    readonly initialTags?: Tags;
}
export interface CreateAndAssignParams {
    name: string;
    id?: string;
    filteredListSize: number;
    onSubmit?: OnSubmitTagsFuncType;
    isFromSearch?: boolean;
    assignOptimisticActionParams?: Partial<CreateManyParams<Tag>>;
    createOptimisticActionParams?: Partial<CreateManyParams<Tag>>;
}
interface TagAssignment {
    id: string;
    index: number;
}
type AssignedTag = TagAssignment & Tag;
export declare class TagsAssignmentState {
    readonly tagsManagementState: TagsManagementState;
    readonly origin: string;
    readonly tagsBIReporter: TagsBIReporter;
    readonly initTask: TaskState<unknown>;
    readonly collection: CollectionState<AssignedTag>;
    readonly optimisticActions: CollectionOptimisticActions<AssignedTag, {}>;
    entityId?: string;
    initialTags: TagAssignment[];
    readonly fqdn: Fqdn;
    constructor({ tagsManagementState, entityId, origin, tagsBIReporter, initialTags, ...params }: TagsAssignmentStateParams);
    init({ entityId }: {
        entityId?: string | null;
    }): () => void;
    get fqdnString(): string;
    get isLoading(): boolean;
    get isError(): boolean;
    retry(): void;
    get assignedTags(): AssignedTag[];
    get assignedTagIds(): string[];
    get initialTagIds(): string[];
    clear(): void;
    replaceAssigned(tagIds: string[]): void;
    assignTag: ({ tag, onSubmit, isFromSearch, optimisticActionParams, }: {
        tag: Tag;
        onSubmit?: OnSubmitTagsFuncType | undefined;
        isFromSearch?: boolean | undefined;
        optimisticActionParams?: Partial<CreateManyParams<Tag>> | undefined;
    }) => Promise<void>;
    unassignTag: ({ tag, onSubmit, isFromSearch, optimisticActionParams, }: {
        tag: Tag;
        onSubmit?: OnSubmitTagsFuncType | undefined;
        isFromSearch?: boolean | undefined;
        optimisticActionParams?: Partial<DeleteManyParams<Tag, {}>> | undefined;
    }) => Promise<void>;
    createAndAssignTag: ({ name, id, filteredListSize, onSubmit, assignOptimisticActionParams, createOptimisticActionParams, }: CreateAndAssignParams) => Promise<void>;
    get isDirty(): boolean;
    private _isFqdnValid;
    private _assignTag;
    private _createAndAssign;
    private _createTag;
    private _invokeBiOnAssignUnassign;
    private _getNewIndex;
}
export {};
//# sourceMappingURL=TagsAssignmentState.d.ts.map