import { registerRoot, Composition } from 'remotion';
import { ReelsComposition, calculateMetadata } from './ReelsComposition';

// Remotion bundle entry point.
// Duration/fps/size are overridden per-render by calculateMetadata.
const RemotionRoot = () => (
  <Composition
    id="ReelsComposition"
    component={ReelsComposition}
    fps={30}
    width={540}
    height={960}
    durationInFrames={900}
    calculateMetadata={calculateMetadata}
    defaultProps={{
      clips: [],
      subtitles: [],
      template: 'viral',
      backgroundImage: null,
      backgroundVideo: null,
    }}
  />
);

registerRoot(RemotionRoot);
