using System;
using System.Collections.Generic;
using System.Linq;
using MCPForUnity.Editor.Constants;
using MCPForUnity.Editor.Helpers;
using MCPForUnity.Editor.Services;
using UnityEditor;
using UnityEngine.UIElements;
namespace MCPForUnity.Editor.Windows.Components.Tools
{
///
/// Controller for the Tools section inside the MCP For Unity editor window.
/// Provides discovery, filtering, and per-tool enablement toggles.
///
public class McpToolsSection
{
private readonly Dictionary toolToggleMap = new();
private Label summaryLabel;
private Label noteLabel;
private Button enableAllButton;
private Button disableAllButton;
private Button rescanButton;
private VisualElement categoryContainer;
private List allTools = new();
public VisualElement Root { get; }
public McpToolsSection(VisualElement root)
{
Root = root;
CacheUIElements();
RegisterCallbacks();
}
private void CacheUIElements()
{
summaryLabel = Root.Q