"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RustTargetLanguage = exports.rustLanguageConfig = exports.rustOptions = void 0;
const index_js_1 = require("../../RendererOptions/index.js");
const TargetLanguage_js_1 = require("../../TargetLanguage.js");
const RustRenderer_js_1 = require("./RustRenderer.js");
const utils_js_1 = require("./utils.js");
exports.rustOptions = {
    density: new index_js_1.EnumOption("density", "Density", {
        normal: utils_js_1.Density.Normal,
        dense: utils_js_1.Density.Dense,
    }, "normal"),
    visibility: new index_js_1.EnumOption("visibility", "Field visibility", {
        private: utils_js_1.Visibility.Private,
        crate: utils_js_1.Visibility.Crate,
        public: utils_js_1.Visibility.Public,
    }, "private"),
    deriveDebug: new index_js_1.BooleanOption("derive-debug", "Derive Debug impl", false),
    deriveClone: new index_js_1.BooleanOption("derive-clone", "Derive Clone impl", false),
    derivePartialEq: new index_js_1.BooleanOption("derive-partial-eq", "Derive PartialEq impl", false),
    skipSerializingNone: new index_js_1.BooleanOption("skip-serializing-none", "Skip serializing empty Option fields", false),
    edition2018: new index_js_1.BooleanOption("edition-2018", "Edition 2018", true),
    leadingComments: new index_js_1.BooleanOption("leading-comments", "Leading Comments", true),
};
exports.rustLanguageConfig = {
    displayName: "Rust",
    names: ["rust", "rs", "rustlang"],
    extension: "rs",
};
class RustTargetLanguage extends TargetLanguage_js_1.TargetLanguage {
    constructor() {
        super(exports.rustLanguageConfig);
    }
    getOptions() {
        return exports.rustOptions;
    }
    makeRenderer(renderContext, untypedOptionValues) {
        return new RustRenderer_js_1.RustRenderer(this, renderContext, (0, index_js_1.getOptionValues)(exports.rustOptions, untypedOptionValues));
    }
}
exports.RustTargetLanguage = RustTargetLanguage;
