package jesse.keeblarcraft.GuiMgr.ShopKeeper;

import net.minecraft.item.Items;
import net.minecraft.village.MerchantInventory;

import java.util.ArrayList;
import java.util.List;

public class ShopKeeperInventory {
    private final List<StoreItem> items;
    private final MerchantInventory merchantInventory;

    public ShopKeeperInventory(MerchantInventory merchantInventory) {
        items = new ArrayList<StoreItem>();
        // This is temporary to see if this stuff works client->server->client etc
        // Also default item for now is a dirt block because why not!
        items.add(new StoreItem("Among Us Statue", "$$$$$$$$$$", 10000, Items.DIRT.getDefaultStack()));
        this.merchantInventory = merchantInventory;
    }

    public List<StoreItem> GetItems() {
        return this.items;
    }

    public Integer Size() {
        System.out.println("Size called...");
        return this.items.size();
    }

    public void Add(StoreItem item) {
        this.items.add(item);
    }

    public void Remove(String upc) {
        this.items.removeIf(item -> item.equals(upc));
    }
}
