import { type Component, type Focusable } from "@earendil-works/pi-tui";
import type { PathMetadata, ResolvedPaths } from "../../../core/package-manager.ts";
import type { SettingsManager } from "../../../core/settings-manager.ts";
type ResourceType = "extensions" | "skills" | "prompts" | "themes";
export interface ResourceItem {
    path: string;
    enabled: boolean;
    metadata: PathMetadata;
    resourceType: ResourceType;
    displayName: string;
    groupKey: string;
    subgroupKey: string;
}
interface ResourceSubgroup {
    type: ResourceType;
    label: string;
    items: ResourceItem[];
}
export interface ResourceGroup {
    key: string;
    label: string;
    scope: "user" | "project" | "temporary";
    origin: "package" | "top-level";
    source: string;
    subgroups: ResourceSubgroup[];
}
export declare function buildGroups(resolved: ResolvedPaths, agentDir: string): ResourceGroup[];
export declare class ConfigSelectorHeader implements Component {
    invalidate(): void;
    render(width: number): string[];
}
export declare class ResourceList implements Component, Focusable {
    private groups;
    private flatItems;
    private filteredItems;
    private selectedIndex;
    private searchInput;
    private maxVisible;
    private settingsManager;
    private cwd;
    private agentDir;
    onCancel?: () => void;
    onExit?: () => void;
    onToggle?: (item: ResourceItem, newEnabled: boolean) => void;
    private _focused;
    get focused(): boolean;
    set focused(value: boolean);
    constructor(groups: ResourceGroup[], settingsManager: SettingsManager, cwd: string, agentDir: string);
    private buildFlatList;
    private findNextItem;
    private filterItems;
    private selectFirstItem;
    updateItem(item: ResourceItem, enabled: boolean): void;
    invalidate(): void;
    render(width: number): string[];
    handleInput(data: string): void;
    private toggleResource;
    private toggleTopLevelResource;
    private togglePackageResource;
    private getTopLevelBaseDir;
    private getResourcePattern;
    private getPackageResourcePattern;
}
export {};
//# sourceMappingURL=config-selector-list.d.ts.map