// ProjectManager.h
#pragma once

#include <string>
#include <filesystem>
#include <cstring>

class ProjectManager
{
public:
    static bool Init();

    /// Load an existing project at projectPath/projectName.
    /// Reads the .cproj, sets current path/name, and ensures folders.
    static bool LoadProject(const std::string& projectPath,
                            const std::string& projectName);

    /// Save (or create) a project at projectPath/projectName.
    /// Writes the .cproj YAML, sets current path/name, and ensures folders.
    static bool SaveProject(const std::string& projectPath,
                            const std::string& projectName);

    // Creates a project at the path with the name
    // makes a .cproj file at the path in the name folder
    static bool CreateProject(const std::string& projectPath,
                            const std::string& projectName);

    void ShowCreateProjectPopup(bool* pOpen);


    static const std::string& GetCurrentProjectPath();
    static const std::string& GetCurrentProjectName();
    static const std::string& GetCurrentAssetsPath();

    static std::string ResolveResPath(const std::string& resPath);



private:
    static std::string s_currentProjectPath;
    static std::string s_currentProjectName;
    static std::string s_defaultScene;

};
