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