#  Rubio - Rubika API library for python
#  Copyright (C) 2025-present Rubio <https://github.com/RubioTeam>
#  Github - https://github.com/RubioTeam/rubio.core


from __future__ import annotations

from typing import Optional, Union
from dataclasses import dataclass
from ..config import Object
import rubio.core


@dataclass
class Button(Object):
    """
    **Represents a generic interactive button in a chat keypad.**
        `from rubio.core.types import Button`

    Attributes:
        id (`str`):
            Unique identifier of the button.

        button_text (`str`):
            Text displayed on the button.

        type (`Optional[Union[str, rubio.core.enums.ButtonType]]`):
            Type of the button.

        button_selection (`Optional[rubio.core.types.ButtonSelection]`):
            Selection-type button.

        button_calendar (`Optional[rubio.core.types.ButtonCalendar]`):
            Calendar-type button.

        button_number_picker (`Optional[rubio.core.types.ButtonNumberPicker]`):
            Number-picker button.

        button_string_picker (`Optional[rubio.core.types.ButtonStringPicker]`):
            String-picker button.

        button_location (`Optional[rubio.core.types.ButtonLocation]`):
            Location picker button.

        button_textbox (`Optional[rubio.core.types.ButtonTextbox]`):
            Textbox input button.

        button_link (`Optional[rubio.core.types.ButtonLink]`):
            Link-type button.
    """
    id: str
    button_text: str
    type: Optional[Union[str, rubio.core.enums.ButtonType]] = rubio.core.enums.ButtonType.SIMPLE
    button_selection: Optional[rubio.core.types.ButtonSelection] = None
    button_calendar: Optional[rubio.core.types.ButtonCalendar] = None
    button_number_picker: Optional[rubio.core.types.ButtonNumberPicker] = None
    button_string_picker: Optional[rubio.core.types.ButtonStringPicker] = None
    button_location: Optional[rubio.core.types.ButtonLocation] = None
    button_textbox: Optional[rubio.core.types.ButtonTextbox] = None