#pragma once

#include <cstddef>
#include <string>

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;
};

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

    size_t getPrice() const override;
    const std::string& name() const override;
};

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

    size_t getPrice() const override;
    const std::string& name() const override;
};

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

    size_t getPrice() const override;
    const std::string& name() const override;
};