import k8sPrompts from '../kubernetes/prompts.js';
import { kubernetesPlatformTypes } from '../../jdl/jhipster/index.js';
import { generatorDefaultConfig } from '../kubernetes/kubernetes-constants.js';
const { GeneratorTypes } = kubernetesPlatformTypes;
const { HELM, K8S } = GeneratorTypes;
export default {
    askForGeneratorType,
    ...k8sPrompts,
};
async function askForGeneratorType() {
    if (!this.options.askAnswered && (this.regenerate || this.config.existed))
        return;
    const prompts = [
        {
            type: 'list',
            name: 'generatorType',
            message: 'Which *type* of generator would you like to base this on?',
            choices: [
                {
                    value: K8S,
                    name: 'Kubernetes generator',
                },
                {
                    value: HELM,
                    name: 'Helm Kubernetes generator',
                },
            ],
            default: this.generatorType ? this.generatorType : generatorDefaultConfig.generatorType,
        },
    ];
    const props = await this.prompt(prompts, this.config);
    this.generatorType = props.generatorType;
}
