#pragma once

#include <SFML/Graphics/RectangleShape.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/Font.hpp>
#include <SFML/Graphics/Sprite.hpp>
#include <SFML/Graphics/Texture.hpp>

#include "core/corefactory.h"

class CoreFactorySFML : public kku::CoreFactory
{
public:
    explicit CoreFactorySFML(sf::RenderTarget * const render_target);
    virtual std::shared_ptr<kku::Music> getMusic() const override;
    virtual std::shared_ptr<kku::Text> getText(kku::Font::Id id) const override;
    virtual std::shared_ptr<kku::Rectangle> getRectangle() const override;
    virtual std::shared_ptr<kku::Line> getLine() const override;
    virtual std::shared_ptr<kku::Sprite> getSprite(kku::GUISprite::Id id) const override;
    virtual kku::Vector2<std::size_t> getRenderSize() const override;

private:
    sf::RenderTarget * const _render_target;
    kku::ResourceHolder<sf::Font, kku::Font::Id> _font_holder;
    kku::ResourceHolder<sf::Texture, kku::Texture::Id> _texture_holder;
};
