import type { Project } from "../types/project";

export function jsonExport(project: Project) {
    const text = JSON.stringify(project, null, 2);
    const blob = new Blob([text], { type: "text/plain;charset=utf-8" })
    const url = URL.createObjectURL(blob);
    const a = document.createElement("a");
    a.href = url;
    a.download = `${project.title}_JSON.json`
    a.click();
    URL.revokeObjectURL(url);
}
