#pragma once

#include <cstddef>
#include <string>

#include "Ship/CargoDamageVisitor.h"

#include <Core/DifficultLvlStrategy.h>

struct Cargo {
    size_t amount;

    Cargo(size_t amount);
    virtual ~Cargo() = default;
    Cargo(const Cargo&) = default;
    Cargo(Cargo&&) = default;
    Cargo& operator=(const Cargo&) = default;
    Cargo& operator=(Cargo&&) = default;

    auto operator<=>(const Cargo&) const = default;

    virtual size_t getPrice() const = 0;
    virtual const std::string& name() const = 0;
    virtual void accept(const CargoDamageVisitor& visitor) = 0;
};

struct Fruit : public Cargo {
    using Cargo::Cargo;

    size_t getPrice() const override;
    const std::string& name() const override;
    void accept(const CargoDamageVisitor& visitor) override;
};

struct Item : public Cargo {
    using Cargo::Cargo;

    size_t getPrice() const override;
    const std::string& name() const override;
    void accept(const CargoDamageVisitor& visitor) override;
};

struct Alcohol : public Cargo {
    using Cargo::Cargo;

    size_t getPrice() const override;
    const std::string& name() const override;
    void accept(const CargoDamageVisitor& visitor) override;
};