#include "Ship/CargoFactory.h"

#include <Core/PrettyPrintVisitor.h>
#include <iostream>


CargoFactory::CargoFactory()
    : _cargo(std::make_unique<Cargo>()) {
}

CargoFactory& CargoFactory::setName(const std::string& name) {
    _cargo->_name = name;
    return *this;
}
CargoFactory& CargoFactory::setamount(int amount) {
    _cargo->_amount = amount;
    return *this;
}
[[nodiscard]] std::unique_ptr<Cargo> ItemFactory::create(const std::string &name, int amount) override {
    return std::unique_move(_cargo);

}
[[nodiscard]] std::unique_ptr<Cargo> AlcoholFactory::create(const std::string &name, int amount) override {
    return std::unique_move(_cargo);
}
[[nodiscard]] std::unique_ptr<Cargo> FruitFactory::create(const std::string &name, int amount) override {
    return std::unique_move(_cargo);
}
