import { BooleanOption, StringOption, getOptionValues, } from "../../RendererOptions/index.js";
import { TargetLanguage } from "../../TargetLanguage.js";
import { GoRenderer } from "./GolangRenderer.js";
export const goOptions = {
    justTypes: new BooleanOption("just-types", "Plain types only", false),
    justTypesAndPackage: new BooleanOption("just-types-and-package", "Plain types with package only", false),
    packageName: new StringOption("package", "Generated package name", "NAME", "main"),
    multiFileOutput: new BooleanOption("multi-file-output", "Renders each top-level object in its own Go file", false),
    fieldTags: new StringOption("field-tags", "list of tags which should be generated for fields", "TAGS", "json"),
    omitEmpty: new BooleanOption("omit-empty", 'If set, all non-required objects will be tagged with ",omitempty"', false),
};
const golangLanguageConfig = {
    displayName: "Go",
    names: ["go", "golang"],
    extension: "go",
};
export class GoTargetLanguage extends TargetLanguage {
    constructor() {
        super(golangLanguageConfig);
    }
    getOptions() {
        return goOptions;
    }
    get supportsUnionsWithBothNumberTypes() {
        return true;
    }
    get stringTypeMapping() {
        const mapping = new Map();
        mapping.set("date-time", "date-time");
        return mapping;
    }
    get supportsOptionalClassProperties() {
        return true;
    }
    makeRenderer(renderContext, untypedOptionValues) {
        return new GoRenderer(this, renderContext, getOptionValues(goOptions, untypedOptionValues));
    }
    get defaultIndentation() {
        return "\t";
    }
}
