/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import type { EditorStore } from '../../EditorStore.js';
import type { ProjectConfigurationEditorState } from './ProjectConfigurationEditorState.js';
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
import { type ProjectDependencyGraphReport, type ProjectDependencyVersionNode, type ProjectDependencyGraph, type ProjectDependencyConflict, type ProjectDependencyVersionConflictInfo, type DependencyResolutionResponse } from '@finos/legend-server-depot';
import type { TreeData, TreeNodeData } from '@finos/legend-art';
import { ProjectDependencyExclusion, type ProjectConfiguration } from '@finos/legend-server-sdlc';
export declare abstract class ProjectDependencyConflictTreeNodeData implements TreeNodeData {
    id: string;
    label: string;
    childrenIds?: string[] | undefined;
    isSelected?: boolean | undefined;
    isOpen?: boolean | undefined;
    constructor(id: string);
    abstract get description(): string;
}
export declare class ConflictTreeNodeData extends ProjectDependencyConflictTreeNodeData {
    conflict: ProjectDependencyConflict;
    constructor(conflict: ProjectDependencyConflict);
    get description(): string;
}
export declare class ConflictVersionNodeData extends ProjectDependencyConflictTreeNodeData {
    versionConflict: ProjectDependencyVersionConflictInfo;
    constructor(conflict: ProjectDependencyVersionConflictInfo);
    get description(): string;
}
export declare class ProjectDependencyTreeNodeData extends ProjectDependencyConflictTreeNodeData implements TreeNodeData {
    value: ProjectDependencyVersionNode;
    constructor(id: string, value: ProjectDependencyVersionNode);
    get description(): string;
}
export declare const buildDependencyNodeChildren: (parentNode: ProjectDependencyTreeNodeData, treeNodes: Map<string, ProjectDependencyTreeNodeData>) => void;
export declare const openAllDependencyNodesInTree: (treeData: TreeData<ProjectDependencyTreeNodeData>, graph: ProjectDependencyGraph) => void;
export declare enum DEPENDENCY_REPORT_TAB {
    EXPLORER = "EXPLORER",
    CONFLICTS = "CONFLICTS",
    RESOLUTION = "RESOLUTION"
}
export declare class ProjectDependencyConflictState {
    readonly uuid: string;
    readonly report: ProjectDependencyGraphReport;
    readonly conflict: ProjectDependencyConflict;
    paths: ProjectDependencyVersionConflictInfo[];
    treeData: TreeData<ProjectDependencyConflictTreeNodeData>;
    constructor(report: ProjectDependencyGraphReport, conflict: ProjectDependencyConflict, paths: ProjectDependencyVersionConflictInfo[]);
    setTreeData(treeData: TreeData<ProjectDependencyConflictTreeNodeData>): void;
    get versionNodes(): ProjectDependencyVersionNode[];
}
export declare class ProjectDependencyEditorState {
    configState: ProjectConfigurationEditorState;
    editorStore: EditorStore;
    isReadOnly: boolean;
    reportTab: DEPENDENCY_REPORT_TAB | undefined;
    fetchingDependencyInfoState: ActionState;
    dependencyReport: ProjectDependencyGraphReport | undefined;
    dependencyTreeData: TreeData<ProjectDependencyTreeNodeData> | undefined;
    flattenDependencyTreeData: TreeData<ProjectDependencyTreeNodeData> | undefined;
    conflictStates: ProjectDependencyConflictState[] | undefined;
    expandConflictsState: ActionState;
    buildConflictPathState: ActionState;
    validatingDependenciesState: ActionState;
    resolvingCompatibleDependenciesState: ActionState;
    resolutionResult: DependencyResolutionResponse | undefined;
    selectedDependencyForExclusions: ProjectDependencyVersionNode | undefined;
    constructor(configState: ProjectConfigurationEditorState, editorStore: EditorStore);
    expandAllConflicts(): void;
    setTreeData(treeData: TreeData<ProjectDependencyTreeNodeData>, flattenView?: boolean): void;
    setReportTab(tab: DEPENDENCY_REPORT_TAB | undefined): void;
    setDependencyTreeData(tree: TreeData<ProjectDependencyTreeNodeData> | undefined): void;
    setConflictStates(val: ProjectDependencyConflictState[] | undefined): void;
    setFlattenDependencyTreeData(tree: TreeData<ProjectDependencyTreeNodeData> | undefined): void;
    get projectConfiguration(): ProjectConfiguration | undefined;
    setSelectedDependencyForExclusions(dependency: ProjectDependencyVersionNode | undefined): void;
    private findProjectDependency;
    addExclusion(dependencyId: string, exclusion: ProjectDependencyExclusion): void;
    addExclusionByCoordinate(dependencyId: string, exclusionCoordinate: string): void;
    removeExclusion(dependencyId: string, exclusion: ProjectDependencyExclusion): void;
    removeExclusionByCoordinate(dependencyId: string, exclusionCoordinate: string): void;
    clearExclusions(dependencyId?: string): void;
    getExclusions(dependencyId: string): ProjectDependencyExclusion[];
    get hasAnyExclusions(): boolean;
    get hasDependencyChanges(): boolean;
    getExclusionCoordinates(dependencyId: string): string[];
    private findExistingExclusion;
    private findExclusionIndex;
    fetchDependencyReport(): GeneratorFn<void>;
    validateAndFetchDependencyReport(): GeneratorFn<void>;
    buildConflictPaths(): void;
    clearTrees(): void;
    clearResolutionResult(): void;
    applyResolvedDependencies(): GeneratorFn<void>;
    resolveCompatibleDependencies(backtrackVersions: number): GeneratorFn<void>;
}
//# sourceMappingURL=ProjectDependencyEditorState.d.ts.map