import { IHoverDelegate } from "../../../../base/browser/ui/hover/hoverDelegate.js"; import { Disposable, IDisposable } from "../../../../base/common/lifecycle.js"; import { IActionWidgetService } from "../../../../platform/actionWidget/browser/actionWidget.service.js"; import { IHoverService } from "../../../../platform/hover/browser/hover.service.js"; export declare const NEW_WORKTREE_LABEL: string; export interface IBranchPickerBranch { readonly name: string; readonly selected?: boolean; readonly unavailable?: boolean; } export interface IBranchPickerState { readonly label: string; readonly branches: readonly IBranchPickerBranch[]; readonly status: "ready" | "loading" | "empty" | "error"; readonly canOpen: boolean; readonly disabledReason?: string; readonly missing?: boolean; readonly showChevron?: boolean; readonly isolation?: IBranchPickerIsolationState; } /** * Static configuration for the optional isolation checkbox rendered before the branch trigger. */ export interface IBranchPickerIsolationOptions { readonly label: string; readonly ariaLabel: string; readonly onToggle: (checked: boolean) => void; readonly slotClassName?: string; readonly markTarget?: (element: HTMLElement) => IDisposable; } /** * Per-update state for the optional isolation checkbox. */ export interface IBranchPickerIsolationState { readonly checked: boolean; readonly state: "enabled" | "disabled" | "hidden"; readonly disabledReason?: string; } export interface IBranchPickerOptions { readonly user: string; readonly hoverDelegate?: IHoverDelegate; readonly onSelectBranch: (branch: string) => void; readonly onRetry?: () => void; readonly slotClassName?: string; readonly triggerClassName?: string; readonly labelClassName?: string; readonly descriptionClassName?: string; readonly keepDisabledFocusable?: boolean; readonly renderDisabledAsStatic?: boolean; readonly ariaLive?: "off" | "polite" | "assertive"; readonly contextViewLayer?: number; readonly isolation?: IBranchPickerIsolationOptions; } /** * Shared branch trigger and ActionWidget used by new-session and automation surfaces. */ export declare class BranchPicker extends Disposable { private readonly _options; private readonly _actionWidgetService; private readonly _hoverService; private readonly _renderDisposables; private readonly _hoverDelegate; private _state; private _slotElement; private _triggerElement; private _descriptionElement; private _isOpen; private _isolationChip; private _isolationState; constructor(_options: IBranchPickerOptions, _actionWidgetService: IActionWidgetService, _hoverService: IHoverService); private _renderIsolation; private _updateIsolation; render(container: HTMLElement): void; update(state: IBranchPickerState): void; showPicker(anchor?: HTMLElement | undefined): void; private _getItems; private _updateTrigger; }