#ifndef VULKAN_IMAGE_VIEW_HPP_
#define VULKAN_IMAGE_VIEW_HPP_

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

namespace Vk
{
    /**
     * @brief Represents a Vulkan image view.
     */
    class ImageView
    {
    private:
        VkImageView m_imageView;
        std::shared_ptr<Vk::Device> m_device;
        std::shared_ptr<Vk::Image> m_image;
    
    public:
        /**
         * @brief Construct an image view.
         * 
         * @param device The device on which the image view is created.
         * @param image The image.
         * @param format The image format.
         */
        ImageView(std::shared_ptr<Vk::Device> device, VkImage image, VkFormat format);

        /**
         * @brief Construct an image view.
         * 
         * @param device The deivce on which the image view is created.
         * @param image The image.
         * @param type The image view type.
         * @param aspectFlags Which aspects of the image are visible to this view.
         */
        ImageView(
            std::shared_ptr<Vk::Device> device,
            std::shared_ptr<Vk::Image> image,
            VkImageViewType type,
            VkImageAspectFlags aspectFlags
        );
        ImageView(const ImageView &) = delete;
        ~ImageView();

        /**
         * @brief Return the wrapped image view.
         */
        VkImageView inner();
    };
}

#endif