#ifndef FLUID_H_
#define FLUID_H_

#include <string>

#include <Block/SpriteBlock/Barrel/Barrel.hpp>
#include <Item/StatefulItem/Capsule/Capsule.hpp>

/**
 * @brief Represents a fluid type.
 */
class Fluid
{
public:
    virtual ~Fluid() = default;

    std::string name;
    std::string displayName;
    std::string textureName;
    float density;
    BarrelTier minBarrelTier;
    CapsuleTier minCapsuleTier;
    Material icon;
    Sound &enterSound;
    Sound &leaveSound;
    glm::vec4 mapColor = glm::vec4(1.0f, 0.0f, 1.0f, 1.0f);
    int flowRate = 1;
    
    /**
     * @brief Construct the fluid.
     * 
     * @param name The unique fluid name of the form "mod:fluid_name" (e.g. "main:water").
     * @param displayName The display name (e.g. "Water").
     * @param textureName The name of the blocktex file (e.g. "water").
     * @param density The density (friction when swimming in this fluid).
     * @param minBarrelTier The minimum barrel tier capable of storing this fluid.
     * @param minCapsuleTier The minimum capsule tier capable of storing this fluid.
     */
    Fluid(
        std::string name,
        std::string displayName,
        std::string textureName,
        float density,
        BarrelTier minBarrelTier,
        CapsuleTier minCapsuleTier,
        Sound &enterSound = Sound::NONE,
        Sound &leaveSound = Sound::NONE
    );

    Fluid& withMapColor(glm::vec4 color);
    Fluid& withFlowRate(int rate);
};

#endif