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