Use a enum from another script

hi, i want to use a enum from another script, but i dont know how… i’m making an inventory, and i want to when i drag and drop a item to verify if the item that i just drop is from the same type of the item that is already in the slot, and if it is to change the sprite.
this is my code (i’m just going to put here the part of the drop the item)
this is the parte of the script from inventory:
Class Inventory:

//drop the item in other slot
if (e.type == EventType.mouseUp && draggingItem) { 
//verefy if the object is the same type of the other
     if (draggingItem == Item.ItemType.OtherObjects) {
             //change the sprite
     }									
}
else {
        inventory [prevIndex] = inventory *;*

_ inventory = draggedItem;_
* draggingItem = false;*
* draggedItem = null;*
}
and this is from the Item, where i have the enum:
Class Item:
public enum ItemType
* {*
* DoorKeys,*
* Papers,*
* OtherObjects,*
* chaveParte*
* }*

For ItemType to be accessible independently of the Item class, (e.g. ItemType.DoorKeys) put it’s definition in the same script as Item.cs but after the closing brackets of the Item class:

//Item.cs

public class Item{

//your code

}

 public enum ItemType
     {
         DoorKeys,
         Papers,
         OtherObjects,
         chaveParte
     }

For ItemType to be accessible as part of the Item class, (e.g. Item.ItemType.DoorKeys) put it’s definition in the same script as Item.cs but inside the closing brackets of the Item class:

    //Item.cs
    
    public class Item{

     public enum ItemType
         {
             DoorKeys,
             Papers,
             OtherObjects,
             chaveParte
         }
    
    //your code
    
    }

Assuming you have an “Item” class which contains the public enum “ItemType”, you can call it from other classes by using “Item.ItemType.”

Or you can just declare the enum outside of any class.