#pragma once

#include <Ship/Cargo.h>

#include <memory>

class CargoFactory {
public:
    CargoFactory();

    [[nodiscard]] virtual std::unique_ptr<Cargo> create(const std::string &name, int amount);

    CargoFactory& setName(const std::string& name);
    CargoFactory& setAmount(int amount);

private:
    std::unique_ptr<Cargo> _cargo;
};

class ItemFactory : public CargoFactory {
    [[nodiscard]] std::unique_ptr<Cargo> create(const std::string &name, int amount);
};
class AlcoholFactory : public CargoFactory {
    [[nodiscard]] std::unique_ptr<Cargo> create(const std::string &name, int amount);
};
class FruitFactory : public CargoFactory {
    [[nodiscard]] std::unique_ptr<Cargo> create(const std::string &name, int amount);
};
