import type { ProjectType } from "@/lib/projects";
import { uuid } from "@/lib/uuid";

function createId(): string {
  return uuid();
}

export function createDefaultSceneData(type: ProjectType): Record<string, unknown> {
  switch (type) {
    case "video": {
      const sceneId = createId();
      return {
        scenes: [
          {
            id: sceneId,
            name: "Scene 1",
            duration: 5,
            layers: [],
            transitionType: "none",
          },
        ],
        activeSceneId: sceneId,
      };
    }
    case "image":
      return {
        canvasWidth: 1080,
        canvasHeight: 1080,
        layers: [],
      };
    case "trimmer":
      return {};
    default:
      return {};
  }
}

export function defaultProjectName(type: ProjectType): string {
  switch (type) {
    case "video":
      return "Untitled video";
    case "image":
      return "Untitled image";
    case "trimmer":
      return "Untitled trim";
    default:
      return "Untitled project";
  }
}
