import { IAdapter } from "./IAdapter.cjs";
import { INodeLocation } from "./INodeLocation.cjs";
import { ITransformationContext } from "./ITransformationContext.cjs";
import { TransformerFeatures } from "./TransformerFeatures.cjs";
import { NameofResult } from "../NameofResult.cjs";
import { FunctionNode } from "../Serialization/FunctionNode.cjs";
import { NameofCall } from "../Serialization/NameofCall.cjs";
import { NumericLiteralNode } from "../Serialization/NumericLiteralNode.cjs";
import { ParsedNode } from "../Serialization/ParsedNode.cjs";
import { PathPart } from "../Serialization/PathPart.cjs";
import { PathPartCandidate } from "../Serialization/PathPartCandidate.cjs";
/**
 * Provides the functionality to parse and dump `nameof` expressions.
 */
export declare abstract class Adapter<TFeatures extends TransformerFeatures<TNode, TContext>, TInput, TNode = TInput, TContext extends ITransformationContext<TNode> = ITransformationContext<TNode>> implements IAdapter<TInput, TNode, TContext> {
    /**
     * A symbol for storing original nodes generated nodes.
     */
    private originalSymbol;
    /**
     * The features of the transformer integration.
     */
    private features;
    /**
     * Initializes a new instance of the {@linkcode Adapter Adapter<TFeatures, TInput, TNode, TContext>} class.
     *
     * @param features
     * The features of the transformer integration.
     */
    constructor(features: TFeatures);
    /**
     * Gets the features of the transformer integration.
     */
    get Features(): TFeatures;
    /**
     * Gets a symbol for storing original nodes generated nodes.
     */
    protected get OriginalSymbol(): symbol;
    /**
     * @inheritdoc
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The expected name of function calls.
     */
    GetNameofName(context: TContext): string;
    /**
     * Extracts the node from the specified {@linkcode input}.
     *
     * @param input
     * The input to extract the node from.
     *
     * @returns
     * The node that was extracted from the specified {@linkcode input}.
     */
    abstract Extract(input: TInput): TNode;
    /**
     * @inheritdoc
     *
     * @param item
     * The item to check.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * A value indicating whether specified {@linkcode item} is mutated.
     */
    IsMutated(item: TNode, context: TContext): boolean;
    /**
     * @inheritdoc
     *
     * @param input
     * The item to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The transformed node.
     */
    Transform(input: TInput, context: TContext): TNode;
    /**
     * @inheritdoc
     *
     * @param item
     * The item whose location to get.
     *
     * @param context
     * The context of the operation.
     */
    abstract GetLocation(item: TNode, context: TContext): INodeLocation;
    /**
     * @inheritdoc
     *
     * @param item
     * The item to get the source code from.
     *
     * @param context
     * The context of the operation.
     */
    abstract GetSourceCode(item: TNode, context: TContext): string;
    /**
     * @inheritdoc
     *
     * @param item
     * The item to generate the source code for.
     *
     * @param context
     * The context of the operation.
     */
    abstract PrintSourceCode(item: TNode, context: TContext): string;
    /**
     * @inheritdoc
     *
     * @param item
     * The item related to the error.
     *
     * @param context
     * The context of the operation.
     *
     * @param error
     * The error to handle.
     */
    ReportError(item: TNode, context: TContext, error: Error): void;
    /**
     * Checks whether the specified {@linkcode item} is a call expression.
     *
     * @param item
     * The item to check.
     */
    protected abstract IsCallExpression(item: TNode): boolean;
    /**
     * Checks whether the specified {@linkcode item} is a property- or an index-accessor.
     *
     * @param item
     * The item to check.
     */
    protected abstract IsAccessExpression(item: TNode): boolean;
    /**
     * Checks whether the specified {@linkcode item} is a string literal.
     *
     * @param item
     * The item to check.
     */
    protected abstract IsStringLiteral(item: TNode): boolean;
    /**
     * Checks whether the specified {@linkcode item} is a template literal.
     *
     * @param item
     * The item to check.
     */
    protected abstract IsTemplateLiteral(item: TNode): boolean;
    /**
     * Gets the elements from the specified {@linkcode arrayLiteral}.
     *
     * @param arrayLiteral
     * The array to get the elements from.
     *
     * @returns
     * Either the elements of the {@linkcode arrayLiteral} or `undefined` if the specified {@linkcode arrayLiteral} is invalid.
     */
    protected abstract GetArrayElements(arrayLiteral: TNode): TNode[] | undefined;
    /**
     * Creates an array literal node with the specified {@linkcode elements}.
     *
     * @param elements
     * The elements of the array literal to create.
     */
    protected abstract CreateArrayLiteral(elements: TNode[]): TNode;
    /**
     * Stores the specified {@linkcode original} node somewhere in the {@linkcode newNode}.
     *
     * @param original
     * The node to store.
     *
     * @param newNode
     * The newly created node.
     */
    protected StoreOriginal(original: TNode, newNode: TNode): void;
    /**
     * Gets the original node which was substituted by the specified {@linkcode node}.
     *
     * @param node
     * The node to get the original from.
     *
     * @returns
     * The original node of the specified {@linkcode node}.
     */
    protected GetOriginal(node: TNode): TNode | undefined;
    /**
     * Gets the {@linkcode NameofCall} represented by the specified {@linkcode node}.
     *
     * @param node
     * The node to convert.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The either a {@linkcode NameofCall} or `undefined` if no `nameof` call was found.
     */
    protected GetNameofCall(node: ParsedNode<TNode>, context: TContext): NameofCall<TNode> | undefined;
    /**
     * Gets the targets of the specified `nameof` {@linkcode call}.
     *
     * @param call
     * The call to get the targets from.
     *
     * @returns
     * The targets of the specified {@linkcode call}.
     */
    protected GetTargets(call: NameofCall<TNode>): readonly TNode[];
    /**
     * Parses the specified {@linkcode item}.
     *
     * @param item
     * The item to parse.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The parsed representation of the specified {@linkcode item}.
     */
    protected Parse(item: TNode, context: TContext): ParsedNode<TNode>;
    /**
     * Tries to parse the specified {@linkcode item} and returns the result or the error that occurred.
     *
     * @param item
     * The item to parse.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The parsed representation of the specified {@linkcode item} or a {@linkcode UnsupportedNode} in case a documented error occurred.
     */
    protected TryParse(item: TNode, context: TContext): ParsedNode<TNode>;
    /**
     * Parses the specified {@linkcode item}.
     *
     * @param item
     * The item to parse.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The parsed representation of the specified {@linkcode item}.
     */
    protected abstract ParseInternal(item: TNode, context: TContext): ParsedNode<TNode>;
    /**
     * Transforms the specified `nameof` {@linkcode call}.
     *
     * @param call
     * The call to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The transformed call.
     */
    protected ProcessNameofCall(call: NameofCall<TNode>, context: TContext): NameofResult<TNode> | Array<NameofResult<TNode>> | undefined;
    /**
     * Processes the specified `nameof` {@linkcode call}.
     *
     * @param call
     * The call to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The parsed representation of the specified {@linkcode call}.
     */
    protected ProcessDefault(call: NameofCall<TNode>, context: TContext): NameofResult<TNode>;
    /**
     * Processes the specified `nameof.typed` {@linkcode call}.
     *
     * @param call
     * The call to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The parsed representation of the specified {@linkcode call}.
     */
    protected ProcessTyped(call: NameofCall<TNode>, context: TContext): NameofResult<TNode> | undefined;
    /**
     * Processes the specified `nameof.full` {@linkcode call}.
     *
     * @param call
     * The call to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The parsed representation of the specified {@linkcode call}.
     */
    protected ProcessFull(call: NameofCall<TNode>, context: TContext): NameofResult<TNode>;
    /**
     * Processes the specified `nameof.split` {@linkcode call}.
     *
     * @param call
     * The call to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The parsed representation of the specified {@linkcode call}.
     */
    protected ProcessSplit(call: NameofCall<TNode>, context: TContext): Array<NameofResult<TNode>>;
    /**
     * Processes the specified `nameof.toArray` {@linkcode call}.
     *
     * @param call
     * The call to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The parsed representation of the specified {@linkcode call}.
     */
    protected ProcessArray(call: NameofCall<TNode>, context: TContext): Array<NameofResult<TNode>>;
    /**
     * Processes the specified `nameof.interpolate` {@linkcode call}.
     *
     * @param call
     * The call to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The transformed call.
     */
    protected ProcessInterpolate(call: NameofCall<TNode>, context: TContext): undefined;
    /**
     * Processes a segment of the specified {@linkcode call}.
     *
     * @param call
     * The call to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The transformed call.
     */
    protected ProcessSegment(call: NameofCall<TNode>, context: TContext): Array<PathPart<TNode>>;
    /**
     * Processes the specified {@linkcode call}.
     *
     * @param call
     * The call to transform.
     *
     * @param node
     * The node to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The transformed call.
     */
    protected ProcessSingle(call: NameofCall<TNode>, node: TNode, context: TContext): Array<PathPartCandidate<TNode>>;
    /**
     * Processes the specified {@linkcode node}.
     *
     * @param functionNode
     * The function of the node to transform.
     *
     * @param node
     * The node to transform.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The transformed representation of the specified {@linkcode node}.
     */
    protected ProcessFunctionBody(functionNode: FunctionNode<TNode>, node: TNode, context: TContext): Array<PathPartCandidate<TNode>>;
    /**
     * Gets the trailing name of the specified {@linkcode path}.
     *
     * @param call
     * The call which is being transformed.
     *
     * @param path
     * The path to get the name from.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The trailing name of the specified {@linkcode path}.
     */
    protected GetName(call: NameofCall<TNode>, path: Array<PathPartCandidate<TNode>>, context: TContext): NameofResult<TNode>;
    /**
     * Extracts a portion of the specified {@linkcode path} according to the specified {@linkcode index}.
     *
     * @param call
     * The call which is being transformed.
     *
     * @param path
     * The path to extract the portion from.
     *
     * @param index
     * The index of the element to start the extraction from.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * A portion of the specified {@linkcode path} according to the specified {@linkcode index}.
     */
    protected GetPath(call: NameofCall<TNode>, path: Array<PathPartCandidate<TNode>>, index: NumericLiteralNode<TNode>, context: TContext): Array<PathPart<TNode>>;
    /**
     * Gets the specified portion from the specified {@linkcode path}.
     *
     * @param call
     * The call which is being transformed.
     *
     * @param path
     * The path to extract the specified portion from.
     *
     * @param start
     * The index of the item to start extracting the path.
     *
     * @param count
     * The number if items to get.
     *
     * @param context
     * The context of the operation.
     *
     * @returns
     * The specified portion of the specified {@linkcode path}.
     */
    protected GetPathSegments(call: NameofCall<TNode>, path: Array<PathPartCandidate<TNode>>, start: number, count: number, context: TContext): Array<PathPart<TNode>>;
    /**
     * Dumps the specified {@linkcode item}.
     *
     * @param item
     * The item to dump.
     */
    protected abstract Dump(item: NameofResult<TNode>): TNode;
    /**
     * Dumps the specified {@linkcode items}.
     *
     * @param items
     * The items to dump-
     *
     * @returns
     * The newly created node.
     */
    protected DumpArray(items: Array<NameofResult<TNode>>): TNode;
}
