"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sxpPrompts = void 0;
const base_1 = require("./base");
/**
 * Set of CLI prompts for an SXP app
 */
exports.sxpPrompts = [
    {
        type: 'input',
        name: 'hostName',
        message: 'What is your Sitecore hostname (used if deployed to Sitecore)?',
        default: (answers) => `${answers.appName || base_1.DEFAULT_APPNAME}.dev.local`,
        when: (answers) => {
            if (answers.yes && !answers.hostName) {
                answers.hostName = `${answers.appName || base_1.DEFAULT_APPNAME}.dev.local`;
            }
            return !answers.hostName;
        },
    },
    {
        type: 'list',
        name: 'fetchWith',
        message: 'How would you like to fetch Layout and Dictionary data?',
        choices: Object.values(base_1.FetchWith),
        default: base_1.DEFAULT_FETCHWITH,
        when: (answers) => {
            if (answers.yes && !answers.fetchWith) {
                answers.fetchWith = base_1.DEFAULT_FETCHWITH;
            }
            return !answers.fetchWith;
        },
    },
];
