"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SmithyTargetLanguage = exports.smithyLanguageConfig = exports.smithyOptions = exports.Framework = void 0;
const index_js_1 = require("../../RendererOptions/index.js");
const Support_js_1 = require("../../support/Support.js");
const TargetLanguage_js_1 = require("../../TargetLanguage.js");
const Smithy4sRenderer_js_1 = require("./Smithy4sRenderer.js");
var Framework;
(function (Framework) {
    Framework["None"] = "None";
})(Framework || (exports.Framework = Framework = {}));
exports.smithyOptions = {
    // FIXME: why does this exist
    framework: new index_js_1.EnumOption("framework", "Serialization framework", { "just-types": Framework.None }, "just-types"),
    packageName: new index_js_1.StringOption("package", "Package", "PACKAGE", "quicktype"),
};
exports.smithyLanguageConfig = {
    displayName: "Smithy",
    names: ["smithy4a"],
    extension: "smithy",
};
class SmithyTargetLanguage extends TargetLanguage_js_1.TargetLanguage {
    constructor() {
        super(exports.smithyLanguageConfig);
    }
    getOptions() {
        return exports.smithyOptions;
    }
    get supportsOptionalClassProperties() {
        return true;
    }
    get supportsUnionsWithBothNumberTypes() {
        return true;
    }
    makeRenderer(renderContext, untypedOptionValues) {
        const options = (0, index_js_1.getOptionValues)(exports.smithyOptions, untypedOptionValues);
        switch (options.framework) {
            case Framework.None:
                return new Smithy4sRenderer_js_1.Smithy4sRenderer(this, renderContext, options);
            default:
                return (0, Support_js_1.assertNever)(options.framework);
        }
    }
}
exports.SmithyTargetLanguage = SmithyTargetLanguage;
