/** @jsxImportSource vargai */
import { Render, Clip, Image, Speech, Music, Captions } from "vargai/react"
import { createVarg } from "vargai/ai"
const varg = createVarg({ apiKey: process.env.VARG_API_KEY! })
const voiceover = Speech({
model: varg.speechModel("eleven_v3"),
voice: "rachel",
children: "Let me take you on a journey through the most beautiful places on Earth. From tropical paradises to mountain peaks, nature never fails to amaze.",
})
const SCENES = [
"tropical beach, crystal clear water, palm trees",
"mountain peaks, snow-capped, golden sunrise",
"deep forest, rays of light through canopy",
]
export default (
<Render width={1080} height={1920}>
<Music prompt="ambient nature documentary, peaceful" model={varg.musicModel()} volume={0.15} duration={15} />
{SCENES.map((prompt, i) => (
<Clip key={i} duration={5} transition={{ name: "crossfade", duration: 0.5 }}>
<Image prompt={prompt} model={varg.imageModel("nano-banana-pro")} aspectRatio="9:16" zoom="in" />
</Clip>
))}
<Captions src={voiceover} style="tiktok" color="#ffffff" withAudio />
</Render>
)