import { useEffect, FC, useState } from "react"; // ui import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui"; // components import { CreateProjectForm } from "@/plane-web/components/projects/create/root"; import { TProject } from "@/plane-web/types/projects"; import { ProjectFeatureUpdate } from "./project-feature-update"; type Props = { isOpen: boolean; onClose: () => void; setToFavorite?: boolean; workspaceSlug: string; data?: Partial; }; enum EProjectCreationSteps { CREATE_PROJECT = "CREATE_PROJECT", FEATURE_SELECTION = "FEATURE_SELECTION", } export const CreateProjectModal: FC = (props) => { const { isOpen, onClose, setToFavorite = false, workspaceSlug, data } = props; // states const [currentStep, setCurrentStep] = useState(EProjectCreationSteps.CREATE_PROJECT); const [createdProjectId, setCreatedProjectId] = useState(null); useEffect(() => { if (isOpen) { setCurrentStep(EProjectCreationSteps.CREATE_PROJECT); setCreatedProjectId(null); } }, [isOpen]); const handleNextStep = (projectId: string) => { if (!projectId) return; setCreatedProjectId(projectId); setCurrentStep(EProjectCreationSteps.FEATURE_SELECTION); }; return ( {currentStep === EProjectCreationSteps.CREATE_PROJECT && ( )} {currentStep === EProjectCreationSteps.FEATURE_SELECTION && ( )} ); };