#pragma once
#include <stdint.h>

class asITypeInfo;
class asIScriptObject;
class asIScriptFunction;

namespace Deer {
    namespace EditorEngine {
        struct DockPanelObject {
        private:
            asITypeInfo* type = nullptr;
            asIScriptObject* object = nullptr;
            asIScriptFunction* renderFunction = nullptr;
            asIScriptFunction* menuBarFunction = nullptr;
            asIScriptFunction* initFunction = nullptr;
            bool isValid = false;

        public:
            DockPanelObject(asITypeInfo*);
            ~DockPanelObject();
            // Delete copy constructor
            DockPanelObject(const DockPanelObject&) = delete;
            DockPanelObject& operator=(const DockPanelObject&) = delete;

            DockPanelObject(DockPanelObject&& other) noexcept;
            DockPanelObject& operator=(DockPanelObject&& other) noexcept;
            
            uint32_t flags = 0;

            void executeRender();
            void invalidate();
            void init();
        };
    }

    enum DockPannelFlags {
        DockPannelFlag_PannelPadding = 1 << 0
    };
}