A way to check if the item and the inventory are of the same type without relying on the Widget

hi, I’ve been learning about how to use blueprints for a few months now, and I’m moving on to complicated things like multiplayer and a well built inventory. I’m working on an inventory component that manages item transfers and it’s already working, but I realized that to check the type of item and if the inventory allows that type of item I depend on the widget. I would not like to depend on the widget since I want to have item exchanges between chests without depending on the player (small items will have inventories too and it would be very bad if I had to create a widget for each small item just to define the type of item that the widget slot accepts). So I was wondering about a way to build an inventory that only accepts specific item types without relying on the widget. Better ways, tips, why a way is bad or not… I’ll take anything and have no problem starting from scratch. I am learning so screenshots would help a lot.

My inventory is an array of a structure.

At the moment I depend on it here.

Simple question here: is it correct to use those structure arrays within the structure to prevent certain items from having certain information?

Thanks