import React from "react";
import { Composition, registerRoot } from "remotion";
import { PitchDeck } from "./compositions/PitchDeck";
import { DemoVideo } from "./compositions/DemoVideo";

const FRAMES_PER_SLIDE = 90;

const RemotionRoot: React.FC = () => {
  return (
    <>
      <Composition
        id="PitchDeck"
        component={PitchDeck}
        width={1920}
        height={1080}
        fps={30}
        durationInFrames={FRAMES_PER_SLIDE * 10}
        defaultProps={{ slides: [], companyName: "" }}
        calculateMetadata={PitchDeck.calculateMetadata}
      />
      <Composition
        id="DemoVideo"
        component={DemoVideo}
        width={1920}
        height={1080}
        fps={30}
        durationInFrames={FRAMES_PER_SLIDE * 8}
        defaultProps={{ slides: [], title: "" }}
        calculateMetadata={DemoVideo.calculateMetadata}
      />
    </>
  );
};

registerRoot(RemotionRoot);
