import { ToolBar, IToolBarOptions } from '../../../base/browser/ui/toolbar/toolbar.js';
import { IAction } from '../../../base/common/actions.js';
import { MenuId, IMenuActionOptions } from '../common/actions.js';
import { IMenuService } from '../common/actions.service.js';
import { IContextKeyService } from '../../contextkey/common/contextkey.service.js';
import { IContextMenuService } from '../../contextview/browser/contextView.service.js';
import { IKeybindingService } from '../../keybinding/common/keybinding.service.js';
import { ITelemetryService } from '../../telemetry/common/telemetry.service.js';

declare const enum HiddenItemStrategy {
    /** This toolbar doesn't support hiding*/
    NoHide = -1,
    /** Hidden items aren't shown anywhere */
    Ignore = 0,
    /** Hidden items move into the secondary group */
    RenderInSecondaryGroup = 1
}
type IWorkbenchToolBarOptions = IToolBarOptions & {
    /**
     * Items of the primary group can be hidden. When this happens the item can
     * - move into the secondary popup-menu, or
     * - not be shown at all
     */
    hiddenItemStrategy?: HiddenItemStrategy;
    /**
     * Optional menu id which is used for a "Reset Menu" command. This should be the
     * menu id that defines the contents of this workbench menu
     */
    resetMenu?: MenuId;
    /**
     * Optional menu id which items are used for the context menu of the toolbar.
     */
    contextMenu?: MenuId;
    /**
     * Optional options how menu actions are created and invoked
     */
    menuOptions?: IMenuActionOptions;
    /**
     * When set the `workbenchActionExecuted` is automatically send for each invoked action. The `from` property
     * of the event will the passed `telemetrySource`-value
     */
    telemetrySource?: string;
    /** This is controlled by the WorkbenchToolBar */
    allowContextMenu?: never;
    /**
     * Controls the overflow behavior of the primary group of toolbar. This isthe maximum number of items and id of
     * items that should never overflow
     *
     */
    overflowBehavior?: {
        maxItems: number;
        exempted?: string[];
    };
};
/**
 * The `WorkbenchToolBar` does
 * - support hiding of menu items
 * - lookup keybindings for each actions automatically
 * - send `workbenchActionExecuted`-events for each action
 *
 * See {@link MenuWorkbenchToolBar} for a toolbar that is backed by a menu.
 */
declare class WorkbenchToolBar extends ToolBar {
    private _options;
    private readonly _menuService;
    private readonly _contextKeyService;
    private readonly _contextMenuService;
    private readonly _sessionDisposables;
    constructor(container: HTMLElement, _options: IWorkbenchToolBarOptions | undefined, _menuService: IMenuService, _contextKeyService: IContextKeyService, _contextMenuService: IContextMenuService, keybindingService: IKeybindingService, telemetryService: ITelemetryService);
    setActions(_primary: readonly IAction[], _secondary?: readonly IAction[], menuIds?: readonly MenuId[]): void;
}

export { HiddenItemStrategy, type IWorkbenchToolBarOptions, WorkbenchToolBar };
