/**
 * Authentication Configuration Prompts (Step 6)
 *
 * Collects authentication method preferences and security settings.
 * Currently supports: Email/Password and Google OAuth
 */
import { checkbox } from '@inquirer/prompts';
import { showSection, showInfo } from '../banner.js';
/**
 * Authentication method options
 * Note: Only email/password and Google OAuth are currently implemented
 */
const AUTH_METHOD_OPTIONS = [
    {
        name: 'Email & Password',
        value: 'emailPassword',
        description: 'Traditional email and password authentication',
        checked: true,
    },
    {
        name: 'Google OAuth',
        value: 'googleOAuth',
        description: 'Sign in with Google accounts',
        checked: false,
    },
];
/**
 * Security feature options
 */
const SECURITY_OPTIONS = [
    {
        name: 'Email Verification',
        value: 'emailVerification',
        description: 'Require users to verify their email address',
        checked: true,
    },
];
/**
 * Get default auth configuration
 */
export function getDefaultAuthConfig() {
    return {
        emailPassword: true,
        googleOAuth: false,
        emailVerification: true,
    };
}
/**
 * Run authentication configuration prompts
 */
export async function promptAuthConfig(mode = 'interactive', totalSteps = 8) {
    showSection('Authentication', 6, totalSteps);
    showInfo('Configure how users will authenticate to your application.');
    console.log('');
    // Select authentication methods
    const selectedMethods = await checkbox({
        message: 'Which authentication methods do you want to enable?',
        choices: AUTH_METHOD_OPTIONS,
    });
    // In expert mode, also ask about security features
    let selectedSecurity = ['emailVerification'];
    if (mode === 'expert') {
        console.log('');
        showInfo('Configure additional security features.');
        console.log('');
        selectedSecurity = await checkbox({
            message: 'Which security features do you want to enable?',
            choices: SECURITY_OPTIONS,
        });
    }
    const auth = {
        emailPassword: selectedMethods.includes('emailPassword'),
        googleOAuth: selectedMethods.includes('googleOAuth'),
        emailVerification: selectedSecurity.includes('emailVerification'),
    };
    return { auth };
}
//# sourceMappingURL=auth-config.js.map