<?php

namespace App\Models\Enums;

enum ItemTypesEnum: int
{
    case ITEM_TYPE_NONE = 0;
    case ITEM_TYPE_WEAPON = 1;
    case ITEM_TYPE_ARMOR = 2;
    case ITEM_TYPE_USE = 3;
    case ITEM_TYPE_AUTOUSE = 4;
    case ITEM_TYPE_MATERIAL = 5;
    case ITEM_TYPE_SPECIAL = 6;
    case ITEM_TYPE_TOOL = 7;
    case ITEM_TYPE_LOTTERY = 8;
    case ITEM_TYPE_ELK = 9;
    case ITEM_TYPE_METIN = 10;
    case ITEM_TYPE_CONTAINER = 11;
    case ITEM_TYPE_FISH = 12;
    case ITEM_TYPE_ROD = 13;
    case ITEM_TYPE_RESOURCE = 14;
    case ITEM_TYPE_CAMPFIRE = 15;
    case ITEM_TYPE_UNIQUE = 16;
    case ITEM_TYPE_SKILLBOOK = 17;
    case ITEM_TYPE_QUEST = 18;
    case ITEM_TYPE_POLYMORPH = 19;
    case ITEM_TYPE_TREASURE_BOX = 20;
    case ITEM_TYPE_TREASURE_KEY = 21;
    case ITEM_TYPE_SKILLFORGET = 22;
    case ITEM_TYPE_GIFTBOX = 23;
    case ITEM_TYPE_PICK = 24;
    case ITEM_TYPE_HAIR = 25;
    case ITEM_TYPE_TOTEM = 26;
    case ITEM_TYPE_BLEND = 27;
    case ITEM_TYPE_COSTUME = 28;
    case ITEM_TYPE_DS = 29;
    case ITEM_TYPE_SPECIAL_DS = 30;
    case ITEM_TYPE_EXTRACT = 31;
    case ITEM_TYPE_SECONDARY_COIN = 32;
    case ITEM_TYPE_RING = 33;
    case ITEM_TYPE_BELT = 34;
    case ITEM_TYPE_SOUL = 35;
    case ITEM_TYPE_GACHA = 36;
    case ITEM_TYPE_PET = 37;
    case ITEM_TYPE_MAX_NUM = 38;

    public function getLabel(): string
    {
        return $this->name;
    }

    public function isUpgradeable(): bool
    {
        return in_array($this, [self::ITEM_TYPE_WEAPON, self::ITEM_TYPE_ARMOR, self::ITEM_TYPE_BELT]);
    }
}
