#ifndef CASING_HPP_
#define CASING_HPP_

#include <Block/SpriteBlock/SpriteBlock.hpp>
#include <Machine/Machine.hpp>
#include <MachineComponent/MultiBlockComponent/MultiBlockComponent.hpp>

class Casing : public SpriteBlock
{
private:
    void createPorts(LocalWorld &world, glm::ivec3 pos, uint8_t meta, glm::ivec3 machinePos);
    void removePorts(LocalWorld &world, glm::ivec3 pos, uint8_t meta);

    static std::vector<Sprite> makeSprites(std::string kindName);

public:
    /**
     * @brief Construct a new casing block.
     * 
     * @param name The name of the block.
     * @param kindName The kind name (e.g. "tin", "steel").
     */
    Casing(std::string name, std::string displayName, std::string kindName);

    virtual bool canManuallyDig() override;
    virtual void onInteract(LocalWorld &world, Player &player, glm::ivec3 pos, Side side, const RGBABytes &collisionKey) override;
};

#endif