import { ErrorCollector } from "./ErrorCollector";
/**
 * Base context class for API converter nodes.
 * Provides logging and error collection capabilities.
 */
export class BaseApiConverterNodeContext {
    errors = new ErrorCollector();
}
/**
 * APIConverterNode is responsible for converting API concepts between different API definition formats.
 * It takes an input from one API definition format and transforms it into an equivalent output
 * in another format. For example, it can convert an OpenAPI operation into an FDR endpoint definition,
 * preserving the semantic meaning while adapting to the target format's structure.
 *
 * @typeparam Input - The type from the source format
 * @typeparam Output - The type from the target format
 */
export class BaseApiConverterNode {
    input;
    context;
    constructor(input, context) {
        this.input = input;
        this.context = context;
    }
    errors() {
        return this.context.errors.errors;
    }
    warnings() {
        return this.context.errors.warnings;
    }
}
