import { BaseOpenApiV3_1ConverterNode, } from "../../../BaseOpenApiV3_1Converter.node";
import { extendType } from "../../../utils/extendType";
import { X_FERN_BASIC_AUTH } from "../fernExtension.consts";
export class XFernBasicAuthNode extends BaseOpenApiV3_1ConverterNode {
    username;
    password;
    constructor(args) {
        super(args);
        this.safeParse();
    }
    // This would be used to set a member on the node
    parse() {
        const basicAuthScheme = extendType(this.input)[X_FERN_BASIC_AUTH];
        this.username = basicAuthScheme?.username;
        this.password = basicAuthScheme?.password;
    }
    convert() {
        return {
            username: this.username,
            password: this.password,
        };
    }
}
