#ifndef VULKAN_IMAGE_HPP_
#define VULKAN_IMAGE_HPP_

#include <Utilities/Extern.hpp>
#include <Vk/Device/Device.hpp>

namespace Vk
{
    /**
     * @brief Represents a Vulkan image.
     */
    class Image
    {
    private:
        std::shared_ptr<Vk::Device> m_device;
        VkImage m_image;
        VkFormat m_format;
        VmaAllocation m_allocation;
        glm::uvec2 dims;
    
    public:
        Image(
            std::shared_ptr<Vk::Device> device,
            VkImageType imageType,
            uint32_t width, uint32_t height,
            VkFormat format,
            VkImageUsageFlags usage,
            VkMemoryPropertyFlags memoryProps,
            uint32_t arrayLayers = 1,
            VkImageCreateFlags flags = 0,
            VkImageTiling tiling = VK_IMAGE_TILING_OPTIMAL,
            VkSharingMode sharingMode = VK_SHARING_MODE_EXCLUSIVE
        );
        Image(const Image &) = delete;
        ~Image();

        /**
         * @brief Return the wrapped image.
         */
        VkImage inner();

        /**
         * @brief Get the image format.
         */
        VkFormat getFormat();

        /**
         * @brief Get the dimensions of the image.
         */
        glm::uvec2 getDims();
    };
}

#endif