/**
 * @fileoverview MCP Test Tool Slide-Out Panel Component
 *
 * Provides a beautiful UX for testing MCP tools with:
 * - Server/Connection/Tool selection
 * - Dynamic parameter input UI based on JSON Schema
 * - Tool execution with results display
 * - User settings caching via UserInfoEngine
 * - Resizable slide-out panel with width persistence
 */
import { EventEmitter, OnInit, OnDestroy, ChangeDetectorRef, ElementRef } from '@angular/core';
import * as i0 from "@angular/core";
/**
 * Parameter input configuration derived from schema
 */
interface ParameterConfig {
    name: string;
    type: string;
    description: string;
    required: boolean;
    defaultValue: unknown;
    enumValues: unknown[];
    format: string | null;
    minimum?: number;
    maximum?: number;
}
/**
 * Tool execution result
 */
interface ToolExecutionResult {
    Success: boolean;
    ErrorMessage?: string;
    Result?: unknown;
    DurationMs?: number;
}
/**
 * Server data for selection
 */
export interface TestToolServerData {
    ID: string;
    Name: string;
    Description: string | null;
    Status: string;
}
/**
 * Connection data for selection
 */
export interface TestToolConnectionData {
    ID: string;
    MCPServerID: string;
    ServerName?: string;
    Name: string;
    Description: string | null;
    Status: string;
}
/**
 * Tool data for selection
 */
export interface TestToolData {
    ID: string;
    MCPServerID: string;
    ServerName?: string;
    ToolName: string;
    ToolTitle: string | null;
    ToolDescription: string | null;
    InputSchema: string;
    Status: string;
}
export declare class MCPTestToolDialogComponent implements OnInit, OnDestroy {
    private cdr;
    private elementRef;
    Visible: boolean;
    Servers: TestToolServerData[];
    Connections: TestToolConnectionData[];
    Tools: TestToolData[];
    /** Pre-selected server ID */
    SelectedServerID: string | null;
    /** Pre-selected connection ID */
    SelectedConnectionID: string | null;
    /** Pre-selected tool ID */
    SelectedToolID: string | null;
    Close: EventEmitter<void>;
    /** Current step: 'select' | 'configure' | 'results' */
    CurrentStep: 'select' | 'configure' | 'results';
    /** Selected IDs */
    ServerID: string | null;
    ConnectionID: string | null;
    ToolID: string | null;
    /** Filtered lists based on selection */
    FilteredConnections: TestToolConnectionData[];
    FilteredTools: TestToolData[];
    /** Display lists for dropdowns (filtered by search) */
    DisplayServers: TestToolServerData[];
    DisplayConnections: TestToolConnectionData[];
    DisplayTools: TestToolData[];
    /** No connections warning */
    NoConnectionsWarning: string | null;
    /** Selected tool details */
    SelectedTool: TestToolData | null;
    ParameterConfigs: ParameterConfig[];
    ParameterValues: Record<string, unknown>;
    /** Execution state */
    IsExecuting: boolean;
    ExecutionResult: ToolExecutionResult | null;
    ExecutionError: string | null;
    /** User settings key prefix */
    private readonly SETTINGS_PREFIX;
    /** Panel width settings key */
    private readonly PANEL_WIDTH_SETTING_KEY;
    /** Panel width constraints */
    private readonly MIN_PANEL_WIDTH;
    private readonly MAX_PANEL_WIDTH;
    private readonly DEFAULT_PANEL_WIDTH;
    private readonly MOBILE_BREAKPOINT;
    /** Current panel width in pixels */
    PanelWidth: number;
    /** Whether user is currently resizing */
    IsResizing: boolean;
    /** Whether panel should be full-width (mobile mode) */
    get IsMobileMode(): boolean;
    /** Subject for debounced width persistence */
    private widthPersistSubject;
    private destroy$;
    private gqlProvider;
    constructor(cdr: ChangeDetectorRef, elementRef: ElementRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    onServerChange(): void;
    onConnectionChange(): void;
    onToolChange(): void;
    /**
     * Handle server dropdown filter change
     */
    onServerFilterChange(filter: string): void;
    /**
     * Handle connection dropdown filter change
     */
    onConnectionFilterChange(filter: string): void;
    /**
     * Handle tool dropdown filter change
     */
    onToolFilterChange(filter: string): void;
    /**
     * Can proceed to configuration step
     */
    get CanProceedToConfig(): boolean;
    /**
     * Proceed to configuration step
     */
    proceedToConfig(): Promise<void>;
    /**
     * Parse the tool's input schema to create parameter configurations
     */
    private parseInputSchema;
    /**
     * Normalize JSON Schema type to string
     */
    private normalizeType;
    /**
     * Get default value for a type
     */
    private getDefaultForType;
    /**
     * Load cached parameter values from UserInfoEngine
     */
    private loadCachedParameters;
    /**
     * Save current parameter values to cache
     */
    private saveCachedParameters;
    /**
     * Get the setting key for caching parameters
     */
    private getSettingKey;
    /**
     * Get input type for a parameter
     */
    getInputType(config: ParameterConfig): string;
    /**
     * Check if parameter should use textarea
     */
    isTextarea(config: ParameterConfig): boolean;
    /**
     * Handle parameter value change
     */
    onParameterChange(name: string, value: unknown): void;
    /**
     * Get parameter value as string for textarea display
     */
    getTextareaValue(name: string): string;
    /**
     * Handle textarea change - parse JSON if needed
     */
    onTextareaChange(name: string, value: string, config: ParameterConfig): void;
    /**
     * Validate that all required parameters have values
     */
    get IsValid(): boolean;
    /**
     * Execute the tool
     */
    executeTool(): Promise<void>;
    /**
     * Format the result for display
     */
    get FormattedResult(): string;
    /**
     * Check if result is JSON
     */
    get IsResultJson(): boolean;
    /**
     * Copy result to clipboard
     */
    copyResult(): Promise<void>;
    /**
     * Go back to previous step
     */
    goBack(): void;
    /**
     * Run the tool again with same parameters
     */
    runAgain(): Promise<void>;
    /**
     * Close the dialog
     */
    closeDialog(): void;
    /**
     * Start resize operation
     */
    onResizeStart(event: MouseEvent): void;
    /**
     * Handle mouse move during resize
     */
    onMouseMove(event: MouseEvent): void;
    /**
     * End resize operation
     */
    onMouseUp(): void;
    /**
     * Handle window resize for mobile mode
     */
    onWindowResize(): void;
    /**
     * Load saved panel width from user settings
     */
    private loadSavedPanelWidth;
    /**
     * Persist panel width to user settings
     */
    private persistPanelWidth;
    /**
     * Get display name for selected server
     */
    get SelectedServerName(): string;
    /**
     * Get display name for selected connection
     */
    get SelectedConnectionName(): string;
    /**
     * Get display name for selected tool
     */
    get SelectedToolName(): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<MCPTestToolDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MCPTestToolDialogComponent, "mj-mcp-test-tool-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "Servers": { "alias": "Servers"; "required": false; }; "Connections": { "alias": "Connections"; "required": false; }; "Tools": { "alias": "Tools"; "required": false; }; "SelectedServerID": { "alias": "SelectedServerID"; "required": false; }; "SelectedConnectionID": { "alias": "SelectedConnectionID"; "required": false; }; "SelectedToolID": { "alias": "SelectedToolID"; "required": false; }; }, { "Close": "Close"; }, never, never, false, never>;
}
export {};
//# sourceMappingURL=mcp-test-tool-dialog.component.d.ts.map