import type { WorkspaceDropIntent } from './drag-preview.utils.js'; import type { WorkspaceLayout } from '../model/layout.utils.js'; import type { WorkspacePanel } from '../../panel/panel.js'; export type WorkspaceSide = 'left' | 'right' | 'top' | 'bottom'; /** A placement supplied on the invoker's `placement` property for `--place`. * Source defaults to one panel; `group` carries its entire current group, including closed members. * An arrangement target identifies the enclosing split of the target panel, before source removal. */ export type WorkspacePlacement = { source?: 'panel' | 'group'; } & ({ operation: 'split'; target: string; position: WorkspaceSide; } | { operation: 'join'; target: string; index?: number; } | { operation: 'reorder'; target: string; position: 'before' | 'after'; } | { operation: 'insert'; scope: 'arrangement'; target: string; position: WorkspaceSide; } | { operation: 'insert'; scope: 'workspace'; position: WorkspaceSide; }); export type WorkspacePlacementIntent = Exclude; /** Identifies a supplied panel and optional placement without requiring an invoker element. */ export interface WorkspaceCommandContext { value?: string | null; placement?: WorkspacePlacement; } export interface WorkspaceCommandSource extends HTMLElement, WorkspaceCommandContext { disabled?: boolean; readOnly?: boolean; } export type WorkspaceCommandEvent = Event & { command?: string; source?: WorkspaceCommandSource | null; }; interface WorkspaceCommandAvailability { command: string; context: WorkspaceCommandContext; layout?: WorkspaceLayout; available: string[]; closable: boolean; rearrangeable: boolean; placementAvailable(source: string[], intent: WorkspacePlacementIntent): boolean; canEnterFullscreen(anchor: string): boolean; canExitFullscreen(): boolean; isFullscreenGroup(anchor: string): boolean; } export declare function findWorkspaceCommandPanel(host: HTMLElement, panels: WorkspacePanel[], event: WorkspaceCommandEvent): WorkspacePanel | undefined; export declare function isWorkspaceCommandAvailable(input: WorkspaceCommandAvailability): boolean; export declare function isWorkspacePlacement(value: unknown): value is WorkspacePlacement; /** Resolves panel IDs to placement operations without exposing region paths. */ export declare function resolveWorkspacePlacement(input: { layout: WorkspaceLayout; available: string[]; anchor: string; placement: WorkspacePlacement; }): { source: string[]; intent: WorkspacePlacementIntent; } | undefined; export {};