import React from "react";
import type { NodeDefinition } from "../node";
import { bindingSchema } from "../node";
import { type ThemeTokens } from "../theme";
import type { TransformRegistry, RouteMap, PageIdentifierMap, EntryIdentifierMap } from "../transforms";
export type ViewModel = Record<string, unknown>;
export type ComponentRegistry = Record<string, React.ElementType>;
export type ResolverContext = {
    viewModel: ViewModel;
    registry: ComponentRegistry;
    transforms?: TransformRegistry;
    theme?: ThemeTokens;
    routes?: RouteMap;
    /** Page identifier -> routeId lookup for { kind: 'page' } links */
    pagesByIdentifier?: PageIdentifierMap;
    /** ContentType -> identifier -> routeId lookup for { kind: 'entry' } links */
    entriesByIdentifier?: EntryIdentifierMap;
    pathBase?: string;
    blockId?: string | null;
    blockKind?: string;
    blockContent?: unknown;
    blockBindings?: Record<string, unknown>;
    editableRouteMetadataFieldIds?: ReadonlyArray<string>;
    fragmentRegistry?: Record<string, unknown>;
};
/** @internal Exported for testing */
export type ScopeEntry = {
    name: string;
    value: unknown;
    basePathSegments?: Array<string | number>;
};
/** @internal Exported for testing */
export type InternalContext = ResolverContext & {
    scopes: ScopeEntry[];
};
/**
 * Resolves a binding to its value from the viewModel or scopes.
 * Applies transforms and fallback handling.
 *
 * Path resolution rules (scope-relative):
 * - $root.* → resolves to viewModel root
 * - scopeName.* → resolves to named scope (e.g., item.title, content.heading)
 * - path → resolves relative to innermost (current) scope
 *
 * @internal Exported for testing
 */
export declare function resolveBindingValue(binding: ReturnType<typeof bindingSchema.parse>, context: InternalContext): unknown;
/**
 * Resolves a node definition into a React element.
 * Handles conditionals ($when), scopes ($scopes), repeaters ($repeat), bindings ($bind), and children.
 */
export declare function resolveNode(node: NodeDefinition, context: InternalContext, indexFallback?: number): React.ReactNode | null;
/**
 * Main entry point for resolving node definitions into React elements.
 * Accepts a single node or array of nodes and returns React elements.
 */
export declare function resolveTree(node: NodeDefinition | NodeDefinition[], options: ResolverContext): React.ReactNode;
