/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

#pragma once

#include "Base/IPlatform.hpp"
#include "InputProviderGLFW.hpp"
#include <memory>
#include <vector>

namespace OpenVulkano
{
	class IWindow;

	namespace GLFW
	{
		class PlatformGLFW final : public IPlatform
		{
			std::vector<std::unique_ptr<IWindow>> windows;
			InputProviderGLFW inputProvider;
			bool initialized = false;

		public:
			PlatformGLFW() = default;

			~PlatformGLFW() override;

			[[nodiscard]] bool IsInitialized() const { return initialized; }

			void Init() override;

			void Tick() override;

			void Close() override;

			IWindow* MakeWindow() override;
		};
	}
}