/**
 * Firebase project generator.
 *
 * Wrapper fino sobre generateProject().
 * A lógica de geração comum (cópia, pub get, slang, build_runner, flutterfire)
 * vive em cli/lib/scaffold/generate.js.
 *
 * Hook específico:
 *   postBuild → runDeploy (opcional, controlado por options.deploy)
 */

const { generateProject } = require('../../generate');
async function generateFirebaseProject(targetDir, options) {
  if (!options.appName || !options.bundleId || !options.firebaseProjectId) {
    throw new Error('generateFirebaseProject requires appName, bundleId, firebaseProjectId');
  }

  return generateProject(targetDir, 'firebase', options, {
    applyBackendSetup: null,
    postBuild: null,
  });
}

module.exports = { generateFirebaseProject };
