/******************************************************************************
*	File		-	project.h
*	Author		-	Joey Pollack
*	Date		-	2021/11/09 (y/m/d)
*	Mod Date	-	2021/11/09 (y/m/d)
*	Description	-	Manage data for a game project
******************************************************************************/

#ifndef PROJECT_H_
#define PROJECT_H_

#include <utils/opRes.h>

#include <string>
#include <vector>
#include <filesystem>

namespace lunarium { namespace editor 
{
    class ContentManager;
    class World;

    class Project
    {
    public:
        Project();

        /// location should NOT include the project file
        [[nodiscard]] OpRes GenerateProject(std::string name, std::filesystem::path location);

        /// location should be the full path including the project file
        [[nodiscard]] OpRes LoadProject(std::filesystem::path location);
        void UnloadCurrentProject();
        void SaveProject();

        bool IsLoaded() const;
        const std::string& GetName() const;
        std::filesystem::path GetRootDirectory() const;
        std::filesystem::path GetContentDirectory() const;
        std::filesystem::path GetAssetDirectory() const;

    private:
        bool mIsLoaded;
        std::string mName;
        std::filesystem::path mLocation;

        ContentManager* mpContentManager;
        std::vector<World*> mWorlds;

    private:
        void LoadContent();
    };
}}

#endif  // PROJECT_H_