#pragma once

#include "AppMenu.h"
#include "../PlayerCursor.h"

#include <stack>
#include <memory>
#include <vector>
#include <SFML/Graphics.hpp>


class GamePiecesAppMenu : public AppMenu {
    private:
        PlayerCursor playerCursor;

    public:
        GamePiecesAppMenu(std::shared_ptr<MenuStack> menuStack, std::shared_ptr<Settings> settings, std::shared_ptr<sf::RenderWindow> renderWindow);

        void computeFrame() override;

        void drawFrame() const override;
    
    private:
        void drawSelectedPiecesRow(float yPos) const;

        void drawRow(int piecesSize, float yPos, bool drawFromFirstElem) const;

        void drawPiece(const Piece& piece, int cellSize, const sf::FloatRect& pos, bool selected) const;
};
