import applicationTypes from './application-types.js';
import authenticationTypes from './authentication-types.js';
import databaseTypes from './database-types.js';
import cacheTypes from './cache-types.js';
import serviceDiscoveryTypes from './service-discovery-types.js';
import clientFrameworkTypes from './client-framework-types.js';
import buildToolTypes from './build-tool-types.js';
import searchEngineTypes from './search-engine-types.js';
import testFrameworkTypes from './test-framework-types.js';
import websocketTypes from './websocket-types.js';
import { builtInConfigPropsValidations } from './jdl-validator-definition.js';
import ormToolTypes from './orm-tool-types.js';
import frontOrBackTypes from './front-or-back.types.js';
import workflowTypes from './workflow-types.js';
const { GATEWAY, MONOLITH, MICROSERVICE } = applicationTypes;
const { CASSANDRA, COUCHBASE, MARIADB, MONGODB, MSSQL, MYSQL, NEO4J, ORACLE, POSTGRESQL, SQL, H2_DISK, H2_MEMORY } = databaseTypes;
const NO_DATABASE = databaseTypes.NO;
const { JWT, OAUTH2, SESSION } = authenticationTypes;
const { MAVEN, GRADLE } = buildToolTypes;
const { CAFFEINE, EHCACHE, HAZELCAST, INFINISPAN, MEMCACHED, REDIS } = cacheTypes;
const NO_CACHE_PROVIDER = cacheTypes.NO;
const { CYPRESS, CUCUMBER, GATLING } = testFrameworkTypes;
const { ANGULAR, REACT, VUE, SVELTE, NO } = clientFrameworkTypes;
const { ELASTICSEARCH } = searchEngineTypes;
const NO_SEARCH_ENGINE = searchEngineTypes.NO;
const COUCHBASE_SEARCH_ENGINE = searchEngineTypes.COUCHBASE;
const { EUREKA, CONSUL } = serviceDiscoveryTypes;
const NO_SERVICE_DISCOVERY = serviceDiscoveryTypes.NO;
const { SPRING_WEBSOCKET } = websocketTypes;
const NO_WEBSOCKET = websocketTypes.NO;
const { HIBERNATE, MYBATIS } = ormToolTypes;
const { FRONT, BACK } = frontOrBackTypes;
const { FLOWABLE, CAMUNDA } = workflowTypes;
const ApplicationOptionTypes = {
    STRING: 'string',
    INTEGER: 'integer',
    BOOLEAN: 'boolean',
    LIST: 'list',
};
const optionNames = {
    APPLICATION_TYPE: 'applicationType',
    AUTHENTICATION_TYPE: 'authenticationType',
    BASE_NAME: 'baseName',
    BLUEPRINT: 'blueprint',
    BLUEPRINTS: 'blueprints',
    BUILD_TOOL: 'buildTool',
    CACHE_PROVIDER: 'cacheProvider',
    CLIENT_FRAMEWORK: 'clientFramework',
    CLIENT_PACKAGE_MANAGER: 'clientPackageManager',
    CLIENT_THEME: 'clientTheme',
    CLIENT_THEME_VARIANT: 'clientThemeVariant',
    WITH_ADMIN_UI: 'withAdminUi',
    CREATION_TIMESTAMP: 'creationTimestamp',
    DATABASE_TYPE: 'databaseType',
    DEV_DATABASE_TYPE: 'devDatabaseType',
    DTO_SUFFIX: 'dtoSuffix',
    EMBEDDABLE_LAUNCH_SCRIPT: 'embeddableLaunchScript',
    ENABLE_HIBERNATE_CACHE: 'enableHibernateCache',
    ENABLE_SWAGGER_CODEGEN: 'enableSwaggerCodegen',
    ENABLE_TRANSLATION: 'enableTranslation',
    ENTITY_SUFFIX: 'entitySuffix',
    EXPERIMENTAL: 'experimental',
    GATEWAY_SERVER_PORT: 'gatewayServerPort',
    I_18_N: 'i18N',
    INSTALL_MODULES: 'installModules',
    JHI_PREFIX: 'jhiPrefix',
    JHIPSTER_VERSION: 'jhipsterVersion',
    JWT_SECRET_KEY: 'jwtSecretKey',
    LANGUAGES: 'languages',
    MICROFRONTEND: 'microfrontend',
    MICROFRONTENDS: 'microfrontends',
    NATIVE_LANGUAGE: 'nativeLanguage',
    NPM: 'npm',
    PACKAGE_NAME: 'packageName',
    PACKAGE_FOLDER: 'packageFolder',
    PROD_DATABASE_TYPE: 'prodDatabaseType',
    REACTIVE: 'reactive',
    REMEMBER_ME_KEY: 'rememberMeKey',
    SEARCH_ENGINE: 'searchEngine',
    SERVER_PORT: 'serverPort',
    SERVICE_DISCOVERY_TYPE: 'serviceDiscoveryType',
    SKIP_CLIENT: 'skipClient',
    SKIP_GIT: 'skipGit',
    SKIP_INSTALL: 'skipInstall',
    SKIP_SERVER: 'skipServer',
    SKIP_USER_MANAGEMENT: 'skipUserManagement',
    TEST_FRAMEWORKS: 'testFrameworks',
    WEBSOCKET: 'websocket',
    ENABLE_GRADLE_ENTERPRISE: 'enableGradleEnterprise',
    GRADLE_ENTERPRISE_HOST: 'gradleEnterpriseHost',
    USER_ID_TYPE: 'userIdType',
    SKIP_INIT_JDL: 'skipInitJdl',
    MOBILE_FRAMEWORK: 'mobileFramework',
    MOBILE_THEME: 'mobileTheme',
    WITH_WEBSITE: 'withWebsite',
    ORM_TOOL: 'ormTool',
    BUILT_IN_SERVICES: 'builtInServices',
    FRONT_OR_BACK: 'frontOrBack',
    JOB_SCHEDULER: 'jobScheduler',
    USE_LOMBOK: 'useLombok',
    MULTI_MODULE: 'multiModule',
    USE_COMMON_TABLE: 'useCommonTable',
    USE_MULTI_TENANT: 'useMultiTenant',
    SOFT_DELETE: 'softDelete',
    JAVA_VERSION: 'javaVersion',
    WORKFLOW: 'workflow',
};
export const jhipsterOptionValues = {
    [optionNames.APPLICATION_TYPE]: {
        [MONOLITH]: MONOLITH,
        [MICROSERVICE]: MICROSERVICE,
        [GATEWAY]: GATEWAY,
    },
    [optionNames.AUTHENTICATION_TYPE]: {
        [JWT]: JWT,
        [OAUTH2]: OAUTH2,
        [SESSION]: SESSION,
    },
    [optionNames.BASE_NAME]: 'begcode',
    [optionNames.BLUEPRINT]: undefined,
    [optionNames.BLUEPRINTS]: [],
    [optionNames.BUILD_TOOL]: {
        [MAVEN]: MAVEN,
        [GRADLE]: GRADLE,
    },
    [optionNames.CACHE_PROVIDER]: {
        [CAFFEINE]: CAFFEINE,
        [EHCACHE]: EHCACHE,
        [HAZELCAST]: HAZELCAST,
        [INFINISPAN]: INFINISPAN,
        [MEMCACHED]: MEMCACHED,
        [REDIS]: REDIS,
        [NO_CACHE_PROVIDER]: NO_CACHE_PROVIDER,
    },
    [optionNames.CLIENT_FRAMEWORK]: {
        [ANGULAR]: ANGULAR,
        [REACT]: REACT,
        [VUE]: VUE,
        [SVELTE]: SVELTE,
        [NO]: NO,
    },
    [optionNames.CLIENT_PACKAGE_MANAGER]: {
        npm: 'npm',
        pnpm: 'pnpm',
    },
    [optionNames.CLIENT_THEME]: 'vben',
    [optionNames.DATABASE_TYPE]: {
        [SQL]: SQL,
        [MONGODB]: MONGODB,
        [CASSANDRA]: CASSANDRA,
        [COUCHBASE]: COUCHBASE,
        [NEO4J]: NEO4J,
        [NO_DATABASE]: NO_DATABASE,
    },
    [optionNames.DEV_DATABASE_TYPE]: {
        [H2_DISK]: H2_DISK,
        [H2_MEMORY]: H2_MEMORY,
        [MYSQL]: MYSQL,
        [MARIADB]: MARIADB,
        [POSTGRESQL]: POSTGRESQL,
        [ORACLE]: ORACLE,
        [MSSQL]: MSSQL,
    },
    [optionNames.DTO_SUFFIX]: 'DTO',
    [optionNames.EMBEDDABLE_LAUNCH_SCRIPT]: true,
    [optionNames.ENABLE_HIBERNATE_CACHE]: true,
    [optionNames.ENABLE_SWAGGER_CODEGEN]: false,
    [optionNames.ENABLE_TRANSLATION]: true,
    [optionNames.ENTITY_SUFFIX]: '',
    [optionNames.EXPERIMENTAL]: false,
    [optionNames.I_18_N]: true,
    [optionNames.INSTALL_MODULES]: false,
    [optionNames.JHI_PREFIX]: 'jhi',
    [optionNames.JHIPSTER_VERSION]: '',
    [optionNames.JWT_SECRET_KEY]: '',
    [optionNames.LANGUAGES]: [],
    [optionNames.MICROFRONTEND]: false,
    [optionNames.MICROFRONTENDS]: [],
    [optionNames.NPM]: true,
    [optionNames.PACKAGE_FOLDER]: 'com/mycompany/myapp',
    [optionNames.PACKAGE_NAME]: 'com.mycompany.myapp',
    [optionNames.PROD_DATABASE_TYPE]: {
        [MYSQL]: MYSQL,
        [MARIADB]: MARIADB,
        [POSTGRESQL]: POSTGRESQL,
        [ORACLE]: ORACLE,
        [MSSQL]: MSSQL,
        [NO_DATABASE]: NO_DATABASE,
    },
    [optionNames.REACTIVE]: false,
    [optionNames.REMEMBER_ME_KEY]: '',
    [optionNames.SEARCH_ENGINE]: {
        [ELASTICSEARCH]: ELASTICSEARCH,
        [COUCHBASE_SEARCH_ENGINE]: COUCHBASE_SEARCH_ENGINE,
        [NO_SEARCH_ENGINE]: NO_SEARCH_ENGINE,
    },
    [optionNames.SERVER_PORT]: 8080,
    [optionNames.SERVICE_DISCOVERY_TYPE]: {
        [EUREKA]: EUREKA,
        [CONSUL]: CONSUL,
        [NO_SERVICE_DISCOVERY]: NO_SERVICE_DISCOVERY,
    },
    [optionNames.SKIP_CLIENT]: false,
    [optionNames.SKIP_GIT]: false,
    [optionNames.SKIP_INSTALL]: false,
    [optionNames.SKIP_SERVER]: false,
    [optionNames.SKIP_USER_MANAGEMENT]: false,
    [optionNames.TEST_FRAMEWORKS]: {
        [CYPRESS]: CYPRESS,
        [CUCUMBER]: CUCUMBER,
        [GATLING]: GATLING,
    },
    [optionNames.WEBSOCKET]: {
        [SPRING_WEBSOCKET]: SPRING_WEBSOCKET,
        no: NO_WEBSOCKET,
    },
    [optionNames.WITH_ADMIN_UI]: true,
    [optionNames.ENABLE_GRADLE_ENTERPRISE]: false,
    [optionNames.GRADLE_ENTERPRISE_HOST]: '',
    [optionNames.SKIP_INIT_JDL]: false,
    [optionNames.WITH_WEBSITE]: false,
    [optionNames.ORM_TOOL]: {
        [HIBERNATE]: HIBERNATE,
        [MYBATIS]: MYBATIS,
    },
    [optionNames.BUILT_IN_SERVICES]: [],
    [optionNames.USER_ID_TYPE]: {
        long: 'long',
        string: 'string',
        uuid: 'uuid',
    },
    [optionNames.FRONT_OR_BACK]: {
        [FRONT]: FRONT,
        [BACK]: BACK,
    },
    [optionNames.USE_LOMBOK]: true,
    [optionNames.MULTI_MODULE]: false,
    [optionNames.USE_COMMON_TABLE]: false,
    [optionNames.USE_MULTI_TENANT]: false,
    [optionNames.SOFT_DELETE]: false,
    [optionNames.JAVA_VERSION]: '17',
    [optionNames.WORKFLOW]: {
        [FLOWABLE]: FLOWABLE,
        [CAMUNDA]: CAMUNDA,
    },
};
export const jhipsterOptionTypes = {
    [optionNames.APPLICATION_TYPE]: { type: ApplicationOptionTypes.STRING },
    [optionNames.AUTHENTICATION_TYPE]: { type: ApplicationOptionTypes.STRING },
    [optionNames.BASE_NAME]: { type: ApplicationOptionTypes.STRING },
    [optionNames.BLUEPRINT]: { type: ApplicationOptionTypes.STRING },
    [optionNames.BLUEPRINTS]: { type: ApplicationOptionTypes.LIST },
    [optionNames.BUILD_TOOL]: { type: ApplicationOptionTypes.STRING },
    [optionNames.CACHE_PROVIDER]: { type: ApplicationOptionTypes.STRING },
    [optionNames.CLIENT_FRAMEWORK]: { type: ApplicationOptionTypes.STRING },
    [optionNames.CLIENT_PACKAGE_MANAGER]: { type: ApplicationOptionTypes.STRING },
    [optionNames.CLIENT_THEME]: { type: ApplicationOptionTypes.STRING },
    [optionNames.CLIENT_THEME_VARIANT]: { type: ApplicationOptionTypes.STRING },
    [optionNames.CREATION_TIMESTAMP]: { type: ApplicationOptionTypes.INTEGER },
    [optionNames.DATABASE_TYPE]: { type: ApplicationOptionTypes.STRING },
    [optionNames.DEV_DATABASE_TYPE]: { type: ApplicationOptionTypes.STRING },
    [optionNames.DTO_SUFFIX]: { type: ApplicationOptionTypes.STRING },
    [optionNames.EMBEDDABLE_LAUNCH_SCRIPT]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.ENABLE_HIBERNATE_CACHE]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.ENABLE_SWAGGER_CODEGEN]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.ENTITY_SUFFIX]: { type: ApplicationOptionTypes.STRING },
    [optionNames.EXPERIMENTAL]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.GATEWAY_SERVER_PORT]: { type: ApplicationOptionTypes.INTEGER },
    [optionNames.I_18_N]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.INSTALL_MODULES]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.JHI_PREFIX]: { type: ApplicationOptionTypes.STRING },
    [optionNames.JHIPSTER_VERSION]: { type: ApplicationOptionTypes.STRING },
    [optionNames.JWT_SECRET_KEY]: { type: ApplicationOptionTypes.STRING },
    [optionNames.LANGUAGES]: { type: ApplicationOptionTypes.LIST },
    [optionNames.MICROFRONTEND]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.MICROFRONTENDS]: { type: ApplicationOptionTypes.LIST },
    [optionNames.NATIVE_LANGUAGE]: { type: ApplicationOptionTypes.STRING },
    [optionNames.NPM]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.PACKAGE_NAME]: { type: ApplicationOptionTypes.STRING },
    [optionNames.PACKAGE_FOLDER]: { type: ApplicationOptionTypes.STRING },
    [optionNames.PROD_DATABASE_TYPE]: { type: ApplicationOptionTypes.STRING },
    [optionNames.REACTIVE]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.REMEMBER_ME_KEY]: { type: ApplicationOptionTypes.STRING },
    [optionNames.SEARCH_ENGINE]: { type: ApplicationOptionTypes.STRING },
    [optionNames.SERVER_PORT]: { type: ApplicationOptionTypes.INTEGER },
    [optionNames.SERVICE_DISCOVERY_TYPE]: { type: ApplicationOptionTypes.STRING },
    [optionNames.SKIP_CLIENT]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.SKIP_GIT]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.SKIP_INSTALL]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.SKIP_SERVER]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.SKIP_USER_MANAGEMENT]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.TEST_FRAMEWORKS]: { type: ApplicationOptionTypes.LIST },
    [optionNames.WEBSOCKET]: { type: ApplicationOptionTypes.STRING },
    [optionNames.WITH_ADMIN_UI]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.ENABLE_GRADLE_ENTERPRISE]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.GRADLE_ENTERPRISE_HOST]: { type: ApplicationOptionTypes.STRING },
    [optionNames.WITH_WEBSITE]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.ORM_TOOL]: { type: ApplicationOptionTypes.STRING },
    [optionNames.BUILT_IN_SERVICES]: { type: ApplicationOptionTypes.LIST },
    [optionNames.USER_ID_TYPE]: { type: ApplicationOptionTypes.STRING },
    [optionNames.SKIP_INIT_JDL]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.FRONT_OR_BACK]: { type: ApplicationOptionTypes.STRING },
    [optionNames.WORKFLOW]: { type: ApplicationOptionTypes.STRING },
    [optionNames.USE_COMMON_TABLE]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.USE_MULTI_TENANT]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.ORM_TOOL]: { type: ApplicationOptionTypes.STRING },
    [optionNames.SOFT_DELETE]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.JAVA_VERSION]: { type: ApplicationOptionTypes.STRING },
    [optionNames.JOB_SCHEDULER]: { type: ApplicationOptionTypes.STRING },
    [optionNames.MULTI_MODULE]: { type: ApplicationOptionTypes.BOOLEAN },
    [optionNames.USE_LOMBOK]: { type: ApplicationOptionTypes.BOOLEAN },
};
export const jhipsterQuotedOptionNames = [
    optionNames.JHIPSTER_VERSION,
    optionNames.REMEMBER_ME_KEY,
    optionNames.JWT_SECRET_KEY,
    optionNames.GRADLE_ENTERPRISE_HOST,
];
export const builtInJDLApplicationConfig = {
    optionsTypes: jhipsterOptionTypes,
    optionsValues: {},
    quotedOptionNames: jhipsterQuotedOptionNames,
    validatorConfig: builtInConfigPropsValidations,
    tokenConfigs: [],
};
const OptionNames = optionNames;
const OptionValues = jhipsterOptionValues;
export default {
    OptionNames,
    OptionValues,
    QuotedOptionNames: jhipsterQuotedOptionNames,
};
