import { Event, Emitter } from '../../../../base/common/event.js';
import { IAction, IActionRunner } from '../../../../base/common/actions.js';
import { IActionViewItem } from '../../../../base/browser/ui/actionbar/actionbar.js';
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
import { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
import { IThemeService } from '../../../../platform/theme/common/themeService.js';
import { ThemeIcon } from '../../../../base/common/themables.js';
import { Pane, IPaneStyles, IPaneOptions } from '../../../../base/browser/ui/splitview/paneview.js';
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
import { IView, IViewDescriptorService } from '../../../common/views.js';
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
import { MenuId } from '../../../../platform/actions/common/actions.js';
import { IOpenerService } from '../../../../platform/opener/common/opener.js';
import { IProgressIndicator } from '../../../../platform/progress/common/progress.js';
import { CompositeMenuActions } from '../../actions.js';
import { IDropdownMenuActionViewItemOptions } from '../../../../base/browser/ui/dropdown/dropdownActionViewItem.js';
import { FilterWidget } from './viewFilter.js';

declare enum ViewPaneShowActions {
    /** Show the actions when the view is hovered. This is the default behavior. */
    Default = 0,
    /** Always shows the actions when the view is expanded */
    WhenExpanded = 1,
    /** Always shows the actions */
    Always = 2
}
interface IViewPaneOptions extends IPaneOptions {
    readonly id: string;
    readonly showActions?: ViewPaneShowActions;
    readonly titleMenuId?: MenuId;
    readonly donotForwardArgs?: boolean;
    readonly singleViewPaneContainerTitle?: string;
}
declare abstract class ViewPane extends Pane implements IView {
    protected keybindingService: IKeybindingService;
    protected contextMenuService: IContextMenuService;
    protected readonly configurationService: IConfigurationService;
    protected contextKeyService: IContextKeyService;
    protected viewDescriptorService: IViewDescriptorService;
    protected instantiationService: IInstantiationService;
    protected openerService: IOpenerService;
    protected themeService: IThemeService;
    protected telemetryService: ITelemetryService;
    private static readonly AlwaysShowActionsConfig;
    private _onDidFocus;
    readonly onDidFocus: Event<void>;
    private _onDidBlur;
    readonly onDidBlur: Event<void>;
    private _onDidChangeBodyVisibility;
    readonly onDidChangeBodyVisibility: Event<boolean>;
    protected _onDidChangeTitleArea: Emitter<void>;
    readonly onDidChangeTitleArea: Event<void>;
    protected _onDidChangeViewWelcomeState: Emitter<void>;
    readonly onDidChangeViewWelcomeState: Event<void>;
    private _isVisible;
    readonly id: string;
    private _title;
    get title(): string;
    private _titleDescription;
    get titleDescription(): string | undefined;
    private _singleViewPaneContainerTitle;
    get singleViewPaneContainerTitle(): string | undefined;
    readonly menuActions: CompositeMenuActions;
    private progressBar;
    private progressIndicator;
    private toolbar?;
    private readonly showActions;
    private headerContainer?;
    private titleContainer?;
    private titleContainerHover?;
    private titleDescriptionContainer?;
    private titleDescriptionContainerHover?;
    private iconContainer?;
    private iconContainerHover?;
    protected twistiesContainer?: HTMLElement;
    private viewWelcomeController;
    protected readonly scopedContextKeyService: IContextKeyService;
    constructor(options: IViewPaneOptions, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, instantiationService: IInstantiationService, openerService: IOpenerService, themeService: IThemeService, telemetryService: ITelemetryService);
    get headerVisible(): boolean;
    set headerVisible(visible: boolean);
    setVisible(visible: boolean): void;
    isVisible(): boolean;
    isBodyVisible(): boolean;
    setExpanded(expanded: boolean): boolean;
    render(): void;
    protected renderHeader(container: HTMLElement): void;
    protected updateHeader(): void;
    private updateTwistyIcon;
    protected getTwistyIcon(expanded: boolean): ThemeIcon;
    style(styles: IPaneStyles): void;
    private getIcon;
    protected renderHeaderTitle(container: HTMLElement, title: string): void;
    protected updateTitle(title: string): void;
    private setTitleDescription;
    protected updateTitleDescription(description?: string | undefined): void;
    private calculateTitle;
    protected renderBody(container: HTMLElement): void;
    protected layoutBody(height: number, width: number): void;
    onDidScrollRoot(): void;
    getProgressIndicator(): IProgressIndicator;
    protected getProgressLocation(): string;
    protected getBackgroundColor(): string;
    focus(): void;
    private setActions;
    private updateActionsVisibility;
    protected updateActions(): void;
    getActionViewItem(action: IAction, options?: IDropdownMenuActionViewItemOptions): IActionViewItem | undefined;
    getActionsContext(): unknown;
    getActionRunner(): IActionRunner | undefined;
    getOptimalWidth(): number;
    saveState(): void;
    shouldShowWelcome(): boolean;
    getFilterWidget(): FilterWidget | undefined;
    shouldShowFilterInHeader(): boolean;
}

export { type IViewPaneOptions, ViewPane, ViewPaneShowActions };
