import { HashMap, ReadonlyHashMap } from '../coreUtils/hashMap';
import { ElementIri, LinkKey } from '../data/model';
import { ValidationProvider, ValidatedElement, ValidatedLink, ValidationSeverity } from '../data/validationProvider';
import { AuthoringState } from './authoringState';
import { DataGraphStructure } from './dataDiagramModel';
import { EditorController } from './editorController';
/**
 * Immutable validation state for the data changes from the graph authoring.
 *
 * @category Core
 */
export interface ValidationState {
    /**
     * Validation state for the entities.
     */
    readonly elements: ReadonlyMap<ElementIri, ElementValidation>;
    /**
     * Validation state for the relations.
     */
    readonly links: ReadonlyHashMap<LinkKey, LinkValidation>;
}
/**
 * Validation state for a single entity.
 */
export interface ElementValidation {
    /**
     * Whether the entity is currently being validated.
     */
    readonly loading: boolean;
    /**
     * Validation errors for the entity.
     */
    readonly items: ReadonlyArray<ValidatedElement>;
}
/**
 * Validation state for a single relation.
 */
export interface LinkValidation {
    /**
     * Whether the relation is currently being validated.
     */
    readonly loading: boolean;
    /**
     * Validation errors for the relation.
     */
    readonly items: ReadonlyArray<ValidatedLink>;
}
/**
 * Utility functions to operate on validation state for the graph authoring.
 *
 * @category Core
 */
export declare namespace ValidationState {
    const empty: ValidationState;
    const emptyElement: ElementValidation;
    const emptyLink: LinkValidation;
    function createMutable(): {
        elements: Map<ElementIri, ElementValidation>;
        links: HashMap<LinkKey, LinkValidation>;
    };
    function setElementItems(state: ValidationState, target: ElementIri, items: ReadonlyArray<ValidatedElement>): ValidationState;
    function setLinkItems(state: ValidationState, target: LinkKey, items: ReadonlyArray<ValidatedLink>): ValidationState;
}
export declare function changedElementsToValidate(previousAuthoring: AuthoringState, currentAuthoring: AuthoringState, graph: DataGraphStructure): Set<ElementIri>;
export declare function validateElements(targets: ReadonlySet<ElementIri>, validationProvider: ValidationProvider, graph: DataGraphStructure, editor: EditorController, signal: AbortSignal | undefined): void;
export declare function getMaxSeverity(items: ReadonlyArray<{
    readonly severity: ValidationSeverity;
}>): ValidationSeverity;
//# sourceMappingURL=validation.d.ts.map