import { IActionListItem } from "../../../../../platform/actionWidget/browser/actionList.js"; import { IWorkbenchLayoutService } from "../../../../../workbench/services/layout/browser/layoutService.service.js"; import { IMobilePickerSheetItem } from "../../../../browser/parts/mobile/mobilePickerSheet.js"; import { IWorkspacePickerItem } from "../sessionWorkspacePicker.js"; import { ISessionWorkspaceBrowseAction } from "../../../../services/sessions/common/session.js"; import { CancellationToken } from "../../../../../base/common/cancellation.js"; import { Event } from "../../../../../base/common/event.js"; /** * Plan for translating an action-widget picker entry into mobile sheet * rows. Each plan entry pairs the row(s) we'll show in the bottom sheet * with the dispatch logic to invoke when the user taps it. */ type MobilePickerRow = { readonly sheetItem: IMobilePickerSheetItem; readonly run: () => void; }; /** * Translates the action-widget items produced by * {@link WorkspacePicker._buildItems} (and its subclasses) into rows for * the mobile picker sheet. Submenu entries are flattened — each child * action is shown as its own row. Separator items become dividers. */ export declare function buildMobileWorkspacePickerRows(items: readonly IActionListItem[], dispatch: (item: IWorkspacePickerItem) => void): MobilePickerRow[]; /** * Helper for mobile workspace picker subclasses. Routes to the desktop * action widget when the viewport isn't classified as phone, and * otherwise renders a bottom sheet using the picker's existing item * builder and dispatch logic. * * Browse-action items (e.g. the scoped picker's "Select Folder...") * are hoisted out of the sheet's row list and into icon buttons in the * sheet's title row — this keeps the row list focused on actual * workspaces and commands while keeping the browse shortcut one tap * away. Browse actions that implement {@link ISessionWorkspaceBrowseAction.listFolders} * are instead rendered as an inline search section: a search input at * the top of the sheet and a folder list beneath the recents, refreshed * as the user types. When the picker would otherwise produce only * browse actions (no workspaces, no commands, no inline search), the * first one is invoked directly and the sheet is skipped entirely. */ export declare function showMobileWorkspacePickerSheet(layoutService: IWorkbenchLayoutService, triggerElement: HTMLElement, items: readonly IActionListItem[], dispatch: (item: IWorkspacePickerItem) => void, browseActions: readonly ISessionWorkspaceBrowseAction[], showSearch?: boolean, cancellationToken?: CancellationToken, caption?: string, liveItems?: { readonly getItems: (query: string) => readonly IActionListItem[]; readonly onDidChange: Event; }): Promise; /** * Returns true when the workspace picker should render its options as a * mobile bottom sheet rather than the desktop action-widget popup. Used * by mobile picker subclasses at click time so rotation across the * phone breakpoint behaves correctly. */ export declare function shouldUseMobileWorkspacePickerSheet(layoutService: IWorkbenchLayoutService): boolean; export {};