"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GoTargetLanguage = exports.goOptions = void 0;
const index_js_1 = require("../../RendererOptions/index.js");
const TargetLanguage_js_1 = require("../../TargetLanguage.js");
const GolangRenderer_js_1 = require("./GolangRenderer.js");
exports.goOptions = {
    justTypes: new index_js_1.BooleanOption("just-types", "Plain types only", false),
    justTypesAndPackage: new index_js_1.BooleanOption("just-types-and-package", "Plain types with package only", false),
    packageName: new index_js_1.StringOption("package", "Generated package name", "NAME", "main"),
    multiFileOutput: new index_js_1.BooleanOption("multi-file-output", "Renders each top-level object in its own Go file", false),
    fieldTags: new index_js_1.StringOption("field-tags", "list of tags which should be generated for fields", "TAGS", "json"),
    omitEmpty: new index_js_1.BooleanOption("omit-empty", 'If set, all non-required objects will be tagged with ",omitempty"', false),
};
const golangLanguageConfig = {
    displayName: "Go",
    names: ["go", "golang"],
    extension: "go",
};
class GoTargetLanguage extends TargetLanguage_js_1.TargetLanguage {
    constructor() {
        super(golangLanguageConfig);
    }
    getOptions() {
        return exports.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 GolangRenderer_js_1.GoRenderer(this, renderContext, (0, index_js_1.getOptionValues)(exports.goOptions, untypedOptionValues));
    }
    get defaultIndentation() {
        return "\t";
    }
}
exports.GoTargetLanguage = GoTargetLanguage;
