"""Attachments toolkit registration."""

from __future__ import annotations

from typing import TYPE_CHECKING

from mindroom.tool_system.declarations import (
    SetupType,
    ToolCategory,
    ToolManagedInitArg,
    ToolStatus,
)
from mindroom.tool_system.registration import register_tool_with_metadata

if TYPE_CHECKING:
    from mindroom.custom_tools.attachments import AttachmentTools


@register_tool_with_metadata(
    name="attachments",
    display_name="Attachments",
    description="List and register context-scoped file attachments",
    category=ToolCategory.PRODUCTIVITY,
    status=ToolStatus.AVAILABLE,
    setup_type=SetupType.NONE,
    icon="Paperclip",
    icon_color="text-teal-500",
    config_fields=[],
    dependencies=[],
    managed_init_args=(
        ToolManagedInitArg.RUNTIME_PATHS,
        ToolManagedInitArg.WORKER_TARGET,
        ToolManagedInitArg.TOOL_OUTPUT_WORKSPACE_ROOT,
        ToolManagedInitArg.WORKER_TOOLS_OVERRIDE,
    ),
    function_names=("get_attachment", "list_attachments", "register_attachment"),
)
def attachments_tools() -> type[AttachmentTools]:
    """Return attachments tools."""
    from mindroom.custom_tools.attachments import AttachmentTools

    return AttachmentTools
