import { BooleanOption, EnumOption, StringOption, getOptionValues, } from "../../RendererOptions/index.js";
import { TargetLanguage } from "../../TargetLanguage.js";
import { ElmRenderer } from "./ElmRenderer.js";
export const elmOptions = {
    justTypes: new BooleanOption("just-types", "Plain types only", false),
    useList: new EnumOption("array-type", "Use Array or List", {
        array: false,
        list: true,
    }, "array"),
    // FIXME: Do this via a configurable named eventually.
    moduleName: new StringOption("module", "Generated module name", "NAME", "QuickType"),
};
export const elmLanguageConfig = {
    displayName: "Elm",
    names: ["elm"],
    extension: "elm",
};
export class ElmTargetLanguage extends TargetLanguage {
    constructor() {
        super(elmLanguageConfig);
    }
    getOptions() {
        return elmOptions;
    }
    get supportsOptionalClassProperties() {
        return true;
    }
    get supportsUnionsWithBothNumberTypes() {
        return true;
    }
    makeRenderer(renderContext, untypedOptionValues) {
        return new ElmRenderer(this, renderContext, getOptionValues(elmOptions, untypedOptionValues));
    }
}
