"""Zoom tool configuration."""

from __future__ import annotations

from typing import TYPE_CHECKING

from mindroom.tool_system.declarations import ConfigField, SetupType, ToolCategory, ToolStatus
from mindroom.tool_system.registration import register_tool_with_metadata

if TYPE_CHECKING:
    from agno.tools.zoom import ZoomTools


@register_tool_with_metadata(
    name="zoom",
    display_name="Zoom",
    description="Video conferencing platform for scheduling and managing meetings",
    category=ToolCategory.SOCIAL,
    status=ToolStatus.REQUIRES_CONFIG,
    setup_type=SetupType.OAUTH,
    icon="SiZoom",
    icon_color="text-blue-500",  # Zoom blue
    config_fields=[
        # Authentication parameters
        ConfigField(
            name="account_id",
            label="Account ID",
            type="text",
            required=False,
            placeholder="your_account_id",
            description="Zoom account ID from Server-to-Server OAuth app",
        ),
        ConfigField(
            name="client_id",
            label="Client ID",
            type="text",
            required=False,
            placeholder="your_client_id",
            description="Client ID from Server-to-Server OAuth app",
        ),
        ConfigField(
            name="client_secret",
            label="Client Secret",
            type="password",
            required=False,
            placeholder="your_client_secret",
            description="Client secret from Server-to-Server OAuth app",
        ),
    ],
    dependencies=["requests"],
    docs_url="https://docs.agno.com/tools/toolkits/social/zoom",
    function_names=(
        "delete_meeting",
        "get_access_token",
        "get_meeting",
        "get_meeting_recordings",
        "get_upcoming_meetings",
        "instructions",
        "list_meetings",
        "schedule_meeting",
    ),
)
def zoom_tools() -> type[ZoomTools]:
    """Return Zoom tools for video conferencing and meeting management."""
    from agno.tools.zoom import ZoomTools

    return ZoomTools
