/**
 * 付费修仙真人版 · 镜1+镜2 生成脚本
 * D132 · 铸渊 ICE-GL-ZY001 · 冰朔见证
 * .env 由 video-api-adapter.js 自动加载
 */
const path = require('path');

const { expandPrompt } = require('../engines/hldp-prompt');
const { generateVideo } = require('../engines/video-api-adapter');

async function main() {
  // 镜1: 苏白站在破旧天道宗牌匾下 (15s, CHAR-003+ENV-002)
  const shot1 = expandPrompt(
    'CHAR-003', 'ENV-002',
    '苏白独自一人站在一块歪斜开裂的半人高小木牌下，牌子上歪歪扭扭写着"天道宗"三个字，字迹模糊木头老化，全景中景切换，暖金色调柔和逆光，苏白表情平静略带一丝无奈，风吹动衣袂轻扬',
    '真人写实'
  );
  const prompt1 = shot1.prompt;
  
  console.log('🎬 镜1 · 苏白站在天道宗破牌下 · 15秒');
  console.log('');
  
  const out1 = path.resolve(__dirname, '../outputs/shots/ep01-shot01.mp4');
  const result1 = await generateVideo({
    prompt: prompt1,
    duration: 15,
    resolution: '1080p',
    outputPath: out1,
  });
  console.log('✅ 镜1完成:', result1.videoPath);

  // 镜2: 苏白亮相自信笑容 (15s, CHAR-003)
  const shot2 = expandPrompt(
    'CHAR-003', 'ENV-002',
    '苏白站在一块歪斜开裂的半人高小木牌下，牌子上歪歪扭扭写着"天道宗"三个字，字迹模糊木头老化，近景微仰转全景全身，苏白自信灿烂笑容露齿双手叉腰大声呼喊，柔光暖金色调轻微逆光勾勒轮廓，衣袂在风中轻扬',
    '真人写实'
  );
  
  console.log('');
  console.log('🎬 镜2 · 苏白自信亮相 · 15秒');
  console.log('');
  
  const out2 = path.resolve(__dirname, '../outputs/shots/ep01-shot02.mp4');
  const result2 = await generateVideo({
    prompt: shot2.prompt,
    duration: 15,
    resolution: '1080p',
    outputPath: out2,
  });
  console.log('✅ 镜2完成:', result2.videoPath);
  
  console.log('');
  console.log('🎉 两镜全部完成！');
}

main().catch(e => {
  console.error('❌ 生成失败:', e.message);
  process.exit(1);
});
