"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createInputs = void 0;
function getPlatformInputDefault(alias, source) {
    const $defaults = source.file.platform || {};
    const defaults = $defaults;
    return defaults[alias];
}
function createPlatformInputs(source) {
    const { platform } = source.file;
    function createPlatformInput(alias, question) {
        const defaultValue = getPlatformInputDefault(alias, source);
        const promptModes = ['create'];
        return { alias, defaultValue, question, promptModes };
    }
    if (!platform) {
        return [];
    }
    return [
        createPlatformInput('dirName', 'What do you want to name the wrapping folder?'),
        createPlatformInput('root', 'Where do you want to put the new platform?'),
        createPlatformInput('packageName', 'What do you want to call your new package (excluding the namespace)?'),
    ];
}
function formatInput(input) {
    const { promptModes = ['create'] } = input;
    return { ...input, promptModes };
}
function createInputs(source) {
    const { inputs = [] } = source.file;
    const platformInputs = createPlatformInputs(source);
    return [...platformInputs, ...inputs].map(formatInput);
}
exports.createInputs = createInputs;
//# sourceMappingURL=inputs.js.map