/**
 * Plugin settings UI components.
 *
 * Provides a hierarchical settings interface:
 * - Plugin list (npm plugins + marketplace plugins)
 *   - npm plugin detail (enable/disable, features, config)
 *   - Marketplace plugin detail (enable/disable + read-only metadata)
 *     - Feature toggles
 *     - Config value editor
 */
import { Container } from "@pk-nerdsaver-ai/pi-tui";
import { PluginManager } from "../../extensibility/plugins/manager";
import type { InstalledPluginSummary } from "../../extensibility/plugins/marketplace";
import type { InstalledPlugin } from "../../extensibility/plugins/types";
/**
 * Forwards a keystroke to `input`, but cancels via `onCancel` when the user presses Escape.
 */
export declare function handleInputOrEscape(data: string, input: {
    handleInput(data: string): void;
}, onCancel: () => void): void;
/**
 * One row in the unified plugin list. npm and marketplace plugins live in
 * separate registries with different shapes, so a tagged union keeps both
 * paths type-safe end-to-end (list rendering, value lookup, detail callback).
 */
export type PluginListEntry = {
    kind: "npm";
    plugin: InstalledPlugin;
} | {
    kind: "marketplace";
    plugin: InstalledPluginSummary;
};
export interface PluginListCallbacks {
    onNpmSelect: (plugin: InstalledPlugin) => void;
    onMarketplaceSelect: (plugin: InstalledPluginSummary) => void;
    onCancel: () => void;
}
/**
 * Shows installed plugins from both registries (npm + marketplace) with
 * enable/disable status, scope tag, and shadow indicator. Selecting an entry
 * fans out to the kind-specific detail callback.
 */
export declare class PluginListComponent extends Container {
    #private;
    private readonly entries;
    constructor(entries: ReadonlyArray<PluginListEntry>, callbacks: PluginListCallbacks);
    handleInput(data: string): void;
}
export interface PluginDetailCallbacks {
    onEnabledChange: (enabled: boolean) => void;
    onFeatureChange: (feature: string, enabled: boolean) => void;
    onConfigChange: (key: string, value: unknown) => void;
    onBack: () => void;
}
/**
 * Shows detail settings for a single plugin:
 * - Enable/disable toggle
 * - Feature toggles
 * - Config settings
 */
export declare class PluginDetailComponent extends Container {
    #private;
    private plugin;
    private readonly manager;
    private readonly callbacks;
    constructor(plugin: InstalledPlugin, manager: PluginManager, callbacks: PluginDetailCallbacks);
    handleInput(data: string): void;
}
export interface MarketplacePluginDetailCallbacks {
    onEnabledChange: (enabled: boolean) => void;
    onBack: () => void;
}
/**
 * Detail view for a marketplace plugin. Marketplace plugins do not declare
 * features or settings, so the panel exposes a single enable/disable toggle
 * plus the read-only metadata from the installed-plugins registry.
 */
export declare class MarketplacePluginDetailComponent extends Container {
    #private;
    private plugin;
    private readonly callbacks;
    constructor(plugin: InstalledPluginSummary, callbacks: MarketplacePluginDetailCallbacks);
    handleInput(data: string): void;
}
export interface PluginSettingsCallbacks {
    onClose: () => void;
    onPluginChanged: () => void | Promise<void>;
}
/**
 * Top-level plugin settings component.
 * Manages navigation between plugin list and plugin detail views.
 */
export declare class PluginSettingsComponent extends Container {
    #private;
    private readonly callbacks;
    constructor(cwd: string, callbacks: PluginSettingsCallbacks);
    handleInput(data: string): void;
}
