#pragma once

#include "IPlatformWindow.h"
#include <Windows.h>

class Win32ApplicationContext;
class DesktopManager;

class Win32Window : public IPlatformWindow
{
public:
    Win32Window();
    virtual ~Win32Window() = default;

    static std::unique_ptr<Win32Window> Create();

    LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);

    HWND GetHandle() const;

    void SetHandle(HWND handle)
    {
        mHandle = handle;
    }

    int GetCmdShow() const
    {
        return mCmdShow;
    }

    void SetCmdShow(int cmdShow)
    {
        mCmdShow = cmdShow;
    }

    void CreateNative(Win32ApplicationContext* context, DesktopManager* desktopManager);

private:
    HWND mHandle{ 0 };
    int mCmdShow{ 0 };
    DesktopManager* mDesktopManager;
};