import { type Ref, type ComputedRef } from '#imports'; import type { BlocksProvider } from './blocks.js'; import type { PermissionsProvider } from './permissions.js'; import type { DraggableItem } from '../types/draggable.js'; import type { RenderedFieldListItem } from '../types/field.js'; import type { InteractionMode } from '../types/ui.js'; export type SelectionProvider = { /** * The currently selected UUIDs. */ uuids: Readonly>; /** * Whether the host is currently selected. */ hasHostSelected: ComputedRef; /** * Whether anything is selected. */ hasAnythingSelected: ComputedRef; /** * The selected bundles. */ bundles: ComputedRef; /** * The currently selected UUIDs as a Set. */ uuidsSet: ComputedRef>; /** * The currently selected field list items. */ items: ComputedRef; /** * The currently selected field list item, if only a single item is selected. */ item: ComputedRef; /** * Whether the user is currently dragging a block. */ isDragging: ComputedRef; /** * Whether the user is currently dragging at least one existing block. */ isDraggingExisting: ComputedRef; /** * Whether the user is currently dragging a block. */ draggingMode: Readonly>; /** * Whether the user is currently dragging a block. */ interactionMode: Readonly>; /** * Whether the user is currently in multi select mode. */ isMultiSelecting: Ref; /** * The label of the active editable field. */ activeEditableLabel: Ref; /** * The label of the active droppable field being edited. */ activeDroppableFieldLabel: Ref; /** * The label of any active field-level editing mode (editable or droppable). */ activeFieldLabel: ComputedRef; /** * The items that are currently being dragged. */ dragItems: Ref; /** * The block bundles of the items being dragged. */ dragItemsBundles: ComputedRef; /** * Determine if the given block UUID is currently selected. */ isBlockSelected(uuid: string): boolean; /** * Lock selection. */ lockSelection: (key: string) => void; /** * Unlock selection. */ unlockSelection: (key: string) => void; }; export default function (blocks: BlocksProvider, permissions: PermissionsProvider): SelectionProvider;