#ifndef URANIUM_FISSION_CELL_HPP_
#define URANIUM_FISSION_CELL_HPP_

#include <Item/INuclearReactorComponent.hpp>
#include <Item/StatefulItem/StatefulItem.hpp>

/**
 * @brief Consumes refined uranium and generates power, but also heat.
 */
class FissionCell final :
    public StatefulItem<uint32_t>,
    public INuclearReactorComponent
{
private:
    std::string displayName;
    Material &icon;
    std::string fuelFluidName;
    int powerOutput;
    int maxDamage;

public:
    FissionCell(std::string name, std::string displayName, Material &icon, std::string fuelFluidName, int powerOutput, int maxDamage);

    virtual void describeInNuclearReactor(ItemStack &stack, std::ostream &os) override;
    virtual bool updateNuclearReactor(ItemStack &stack, MNuclearReactor &reactor, glm::ivec2 cellPos) override;
    virtual void onOverheating(ItemStack &stack, MNuclearReactor &reactor, glm::ivec2 cellPos) override;
    virtual glm::vec4 getNuclearReactorSlotHighlight(ItemStack &stack, NuclearReactorController &ctrl, glm::ivec2 pos) override;
    virtual float getHeatConductivity(ItemStack &stack) override;
    virtual std::string getDisplayName(const ItemStack &stack) override;
    virtual void draw(GraphicsContext &context, int x, int y, const ItemStack &stack) override;
    virtual void draw3D(GraphicsContext &context, WorldDisplay &worldDisplay, glm::vec3 pos, ItemStack &stack) override;
    virtual void drawFlat(GraphicsContext &context, WorldDisplay &worldDisplay, glm::mat4 matrix, ItemStack &stack) override;
};

#endif