import { Button } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button"; import { IListRenderer } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/list/list"; import { DisposableStore, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; /** * Install state of a gallery item, used to drive the install button label and enablement. */ export declare enum GalleryItemInstallState { Uninstalled = 0, Installing = 1, Installed = 2 } /** * Adapts a list element to the data and actions a gallery row needs. */ export interface IGalleryItemProvider { getLabel(element: TElement): string; getPublisherDisplayName(element: TElement): string | undefined; getDescription(element: TElement): string | undefined; getInstallState(element: TElement): GalleryItemInstallState; canInstall?(element: TElement): boolean; install(element: TElement): Promise; onDidChangeInstallState?(element: TElement, listener: () => void): IDisposable; } interface IGalleryItemTemplateData { readonly name: HTMLElement; readonly publisher: HTMLElement; readonly description: HTMLElement; readonly installButton: Button; readonly elementDisposables: DisposableStore; readonly templateDisposables: DisposableStore; } /** * Reusable list renderer for a gallery row with an Install button. Shared by the Chat * Customizations tools, MCP server and plugin marketplace lists. All rows share a single set of * `.gallery-item*` styles; data and actions are supplied via {@link IGalleryItemProvider}. */ export declare class GalleryItemRenderer implements IListRenderer { readonly templateId: string; private readonly _provider; constructor(templateId: string, _provider: IGalleryItemProvider); renderTemplate(container: HTMLElement): IGalleryItemTemplateData; renderElement(element: TElement, _index: number, templateData: IGalleryItemTemplateData): void; private _updateInstallButton; disposeTemplate(templateData: IGalleryItemTemplateData): void; } export {};