"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.all = void 0;
exports.languageNamed = languageNamed;
exports.isLanguageName = isLanguageName;
exports.isLanguageDisplayName = isLanguageDisplayName;
const index_js_1 = require("./CJSON/index.js");
const index_js_2 = require("./CPlusPlus/index.js");
const index_js_3 = require("./CSharp/index.js");
const index_js_4 = require("./Crystal/index.js");
const index_js_5 = require("./Dart/index.js");
const index_js_6 = require("./Elixir/index.js");
const index_js_7 = require("./Elm/index.js");
const index_js_8 = require("./Golang/index.js");
const index_js_9 = require("./Haskell/index.js");
const index_js_10 = require("./JSONSchema/index.js");
const index_js_11 = require("./Java/index.js");
const index_js_12 = require("./JavaScript/index.js");
const index_js_13 = require("./JavaScriptPropTypes/index.js");
const index_js_14 = require("./Kotlin/index.js");
const index_js_15 = require("./Objective-C/index.js");
const index_js_16 = require("./Php/index.js");
const index_js_17 = require("./Pike/index.js");
const index_js_18 = require("./Python/index.js");
const index_js_19 = require("./Ruby/index.js");
const index_js_20 = require("./Rust/index.js");
const index_js_21 = require("./Scala3/index.js");
const index_js_22 = require("./Smithy4s/index.js");
const index_js_23 = require("./Swift/index.js");
const index_js_24 = require("./TypeScriptEffectSchema/index.js");
const index_js_25 = require("./TypeScriptFlow/index.js");
const index_js_26 = require("./TypeScriptZod/index.js");
exports.all = [
    new index_js_1.CJSONTargetLanguage(),
    new index_js_2.CPlusPlusTargetLanguage(),
    new index_js_4.CrystalTargetLanguage(),
    new index_js_3.CSharpTargetLanguage(),
    new index_js_5.DartTargetLanguage(),
    new index_js_6.ElixirTargetLanguage(),
    new index_js_7.ElmTargetLanguage(),
    new index_js_25.FlowTargetLanguage(),
    new index_js_8.GoTargetLanguage(),
    new index_js_9.HaskellTargetLanguage(),
    new index_js_11.JavaTargetLanguage(),
    new index_js_12.JavaScriptTargetLanguage(),
    new index_js_13.JavaScriptPropTypesTargetLanguage(),
    new index_js_10.JSONSchemaTargetLanguage(),
    new index_js_14.KotlinTargetLanguage(),
    new index_js_15.ObjectiveCTargetLanguage(),
    new index_js_16.PhpTargetLanguage(),
    new index_js_17.PikeTargetLanguage(),
    new index_js_18.PythonTargetLanguage(),
    new index_js_19.RubyTargetLanguage(),
    new index_js_20.RustTargetLanguage(),
    new index_js_21.Scala3TargetLanguage(),
    new index_js_22.SmithyTargetLanguage(),
    new index_js_23.SwiftTargetLanguage(),
    new index_js_25.TypeScriptTargetLanguage(),
    new index_js_24.TypeScriptEffectSchemaTargetLanguage(),
    new index_js_26.TypeScriptZodTargetLanguage(),
];
exports.all;
function languageNamed(name, targetLanguages = exports.all) {
    const foundLanguage = targetLanguages.find((language) => language.names.includes(name));
    if (!foundLanguage) {
        throw new Error(`Unknown language name: ${name}`);
    }
    return foundLanguage;
}
function isLanguageName(maybeName) {
    if (exports.all.some((lang) => lang.names.includes(maybeName))) {
        return true;
    }
    return false;
}
function isLanguageDisplayName(maybeName) {
    if (exports.all.some((lang) => lang.displayName === maybeName)) {
        return true;
    }
    return false;
}
