import { z } from "zod";
import { projectFilesTable } from "~/db/schema";

export const Project = z.array(z.object({
    id: z.string(),
    path: z.string(),
    title: z.string(),
    type: z.enum(projectFilesTable.type.enumValues),
    navigable: z.boolean(),
    private: z.boolean(),
    order: z.number().finite(),
    timestamp: z.string(),
}));

export type ProjectType = z.infer<typeof Project>;
export type ProjectItemType = ProjectType[number];