from dataclasses import dataclass
from decimal import Decimal
from enum import StrEnum
from typing import Self


class CateringMenuItemCategory(StrEnum):
    MAIN_COURSE = "MAIN_COURSE"
    DESSERT = "DESSERT"
    BEVERAGE_NON_ALCOHOLIC = "BEVERAGE_NON_ALCOHOLIC"
    BEVERAGE_ALCOHOLIC = "BEVERAGE_ALCOHOLIC"
    BEVERAGE_COCKTAIL = "BEVERAGE_COCKTAIL"
    BEVERAGE_SHOT = "BEVERAGE_SHOT"
    BREAKFAST = "BREAKFAST"
    SNACK = "SNACK"
    NON_FOOD = "NON_FOOD"


@dataclass(frozen=False)
class CateringMenuItem:
    item_id: int
    name: str
    price: Decimal
    category: CateringMenuItemCategory
    additional_info: str = str()
    is_disabled: bool = False

    def __hash__(self) -> int:
        return hash(str(self.item_id) + self.name)
