import { Element, Namespace, MemberElement, ObjectElement } from '@swagger-api/apidom-core';
import { ReferenceElement, PathItemElement, LinkElement, ExampleElement, SchemaElement, OpenApi3_1Element } from '@swagger-api/apidom-ns-openapi-3-1';
import Reference from '../../../Reference.ts';
import { AncestorLineage } from '../../util.ts';
import type { ReferenceOptions } from '../../../options/index.ts';
/**
 * Custom mutation replacer.
 * @public
 */
export declare const mutationReplacer: (newElement: Element, oldElement: Element, key: string | number, parent: Element | undefined) => void;
/**
 * @public
 */
export interface OpenAPI3_1DereferenceVisitorOptions {
    readonly namespace: Namespace;
    readonly reference: Reference;
    readonly options: ReferenceOptions;
    readonly indirections?: Element[];
    readonly ancestors?: AncestorLineage<Element>;
    readonly refractCache?: Map<string, Element>;
    readonly allOfDiscriminatorMapping?: Map<string, Element[]>;
}
/**
 * @public
 */
declare class OpenAPI3_1DereferenceVisitor {
    protected readonly indirections: Element[];
    protected readonly namespace: Namespace;
    protected readonly reference: Reference;
    protected readonly options: ReferenceOptions;
    protected readonly ancestors: AncestorLineage<Element>;
    protected readonly refractCache: Map<string, Element>;
    protected readonly allOfDiscriminatorMapping: Map<string, Element[]>;
    constructor({ reference, namespace, options, indirections, ancestors, refractCache, allOfDiscriminatorMapping, }: OpenAPI3_1DereferenceVisitorOptions);
    protected handleDereferenceError(error: unknown, refEl: Element, directAncestors?: Set<Element>): undefined;
    protected getNestedVisitorOptions(referencingElement: ObjectElement): ReferenceOptions;
    protected toBaseURI(uri: string): string;
    protected toReference(uri: string): Promise<Reference>;
    protected toAncestorLineage(ancestors: (Element | Element[] | undefined)[]): [AncestorLineage<Element>, Set<Element>];
    readonly OpenApi3_1Element: {
        leave: (openApi3_1Element: OpenApi3_1Element, key: string | number, parent: Element | undefined, path: (string | number)[], ancestors: [Element | Element[]], link: {
            replaceWith: (element: Element, replacer: typeof mutationReplacer) => void;
        }) => OpenApi3_1Element | undefined;
    };
    ReferenceElement(referencingElement: ReferenceElement, key: string | number, parent: Element | undefined, path: (string | number)[], ancestors: [Element | Element[]], link: {
        replaceWith: (element: Element, replacer: typeof mutationReplacer) => void;
    }): Promise<any>;
    PathItemElement(referencingElement: PathItemElement, key: string | number, parent: Element | undefined, path: (string | number)[], ancestors: [Element | Element[]], link: {
        replaceWith: (element: Element, replacer: typeof mutationReplacer) => void;
    }): Promise<any>;
    LinkElement(linkElement: LinkElement, key: string | number, parent: Element | undefined, path: (string | number)[], ancestors: [Element | Element[]], link: {
        replaceWith: (element: Element, replacer: typeof mutationReplacer) => void;
    }): Promise<LinkElement | undefined>;
    ExampleElement(exampleElement: ExampleElement, key: string | number, parent: Element | undefined, path: (string | number)[], ancestors: [Element | Element[]], link: {
        replaceWith: (element: Element, replacer: typeof mutationReplacer) => void;
    }): Promise<ExampleElement | undefined>;
    MemberElement(memberElement: MemberElement, key: string | number, parent: Element | undefined, path: (string | number)[], ancestors: [Element | Element[]], link: {
        replaceWith: (element: Element, replacer: typeof mutationReplacer) => void;
    }): Promise<false | MemberElement | undefined>;
    SchemaElement(referencingElement: SchemaElement, key: string | number, parent: Element | undefined, path: (string | number)[], ancestors: [Element | Element[]], link: {
        replaceWith: (element: Element, replacer: typeof mutationReplacer) => void;
    }): Promise<any>;
}
export default OpenAPI3_1DereferenceVisitor;
