import { BlockNodeAddress } from '../../../../../../document-api/src/index.js';
import { Editor } from '../../core/Editor.js';
import { BlockCandidate } from '../helpers/node-address-resolver.js';
/**
 * Resolves the PM insertion position for a create-step from an anchor block ID
 * and a position directive.
 *
 * - `'before'` → before the anchor block's opening bracket (`candidate.pos`)
 * - `'after'`  → after the anchor block's closing bracket (`candidate.pos + candidate.nodeSize`)
 *
 * @param editor - The editor instance (used to access block index)
 * @param anchorBlockId - The block ID to anchor insertion relative to
 * @param position - Whether to insert before or after the anchor block
 * @param stepId - Optional step ID for error attribution
 * @returns The absolute PM position for insertion
 */
export declare function resolveBlockInsertionPos(editor: Editor, anchorBlockId: string, position: 'before' | 'after', stepId?: string): number;
export type ResolvedCreateAnchor = {
    pos: number;
    anchor: BlockCandidate;
};
/**
 * Resolves the insertion position for a create-like operation with
 * pre-flight nodeType validation.
 *
 * Uses {@link findBlockByNodeIdOnly} for alias-aware, ambiguity-safe lookup.
 * When the caller specifies a `nodeType` on the target, the resolved block's
 * actual type must match — otherwise an `INVALID_TARGET` error is thrown with
 * structured remediation details.
 *
 * **Do NOT use this for plan-engine steps** — those use
 * {@link resolveBlockInsertionPos} directly because the plan step ID
 * attribution requires a different error shape.
 */
export declare function resolveCreateAnchor(editor: Editor, target: BlockNodeAddress, position: 'before' | 'after', stepId?: string): ResolvedCreateAnchor;
//# sourceMappingURL=create-insertion.d.ts.map