/******************************************************************************
*	File		-	script.h
*	Author		-	Joey Pollack
*	Date		-	2022/11/02 (y/m/d)
*	Mod Date	-	2022/11/02 (y/m/d)
*	Description	-	Editor asset for script files
******************************************************************************/
#ifndef LUNARIUM_SCRIPT_H_
#define LUNARIUM_SCRIPT_H_

#include "editor_asset.h"

#include <filesystem>

namespace lunarium { namespace editor 
{
    class Script : public EditorAsset
    {
    public:
        Script(std::filesystem::path file_location, std::filesystem::path asset_dir);

        OpRes LoadRawFile();
        OpRes Serialize(nlohmann::ordered_json& node);
        OpRes Deserialize(nlohmann::ordered_json& node);
        bool IsValidNode(nlohmann::ordered_json& node);
        nlohmann::ordered_json AsJSON();

        std::filesystem::path GetScriptFile();
        std::string GetScript();

        bool DrawProperties();
    };
}}


#endif	// LUNARIUM_SCRIPT_H_