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