import { DataNode } from '../../../types/data-structures';
import { ToolbarDataNode, ToolbarDataTree } from '../toolbar-types';
export declare const parseNodeIdIntoPath: (nodeId: string) => number[];
export declare const parseNodeIdIntoStringPath: (nodeId: string) => string[];
export declare const parsePathIntoNodeId: (path: number[]) => string;
export declare const getNodeId: (index: number, parentPath?: string) => string;
export declare const getRadioOptionId: (nodeId: string, optionIndex: number) => string;
export declare const getSmpId: (index: number, parentPath?: string) => string;
export declare const hasDynamicData: (node: DataNode) => node is DataNode & {
    fun: string;
};
export declare const updateNodeAtPath: (tree: ToolbarDataTree, path: number[], updater: (node: ToolbarDataNode) => ToolbarDataNode, siblingsUpdater?: (node: ToolbarDataNode) => ToolbarDataNode) => ToolbarDataTree;
export declare const focusNode: (refs: React.RefObject<Map<string, HTMLDivElement>>, id: string) => void;
/** Checks whether a path segment belongs to a radio node */
export declare const isRadioNode: (nodeId: string) => boolean;
/**
 * Parses the numeric index from a path segment.
 * Handles both plain segments ("N") and radio segments ("radioN").
 */
export declare const parseNodeIndex: (nodeId: string) => number;
/** Returns the parent node ID by stripping the last path segment */
export declare const getParentNodeId: (nodeId: string) => string;
/**
 * Strips any trailing radio-option suffix (-radioN) from a node ID,
 * returning the ID of the plain owner node.
 * e.g. "smp-toolbar-1-2-radio3" → "smp-toolbar-1-2"
 */
export declare const getBaseNodeId: (nodeId: string) => string;
/**
 * Builds a sibling node ID by replacing the current node's last segment
 * with a new index, optionally prefixed with "radio".
 */
export declare const buildSiblingId: (nodeId: string, isRadio: boolean, newIndex: number) => string;
/**
 * Returns the ID of the last radio option registered for a given plain node,
 * or null if none exist.
 */
export declare const getLastRadioOptionId: (plainNodeId: string, refs: React.RefObject<Map<string, HTMLDivElement>>) => string | null;
/**
 * Returns the ID of the next (delta=1) or previous (delta=-1) navigable node,
 * respecting the interleaved plain/radio node structure.
 * Resolution order:
 *   1. Same-type adjacent sibling (plain→plain or radio→radio)
 *   2a. If leaving a radio group: adjacent plain node at the parent level
 *   2b. If leaving a plain node going down: first radio option of the next plain node
 *   2b. If leaving a plain node going up: last radio option of the prev plain node
 */
export declare const getAdjacentNodeId: (nodeId: string, nodePath: string[], delta: 1 | -1, refs: React.RefObject<Map<string, HTMLDivElement>>) => string | null;
export declare const toolbarNodeHasChildren: (node: DataNode) => boolean;
//# sourceMappingURL=utils.d.ts.map