/**
 * LinkValue <-> LinkPayload Conversion
 *
 * Bidirectional conversion between block-level LinkValue (used in the editor)
 * and LinkPayload (used in the database and API layer).
 */
import { type CustomLinkValue, type EntryLinkValue, type ExternalLinkValue, type InternalResolvedLinkValue, type LinkValue, type PageLinkValue } from '@riverbankcms/blocks';
import type { LinkPayload, RoutableContentItem } from './types';
export type PersistableNavigationLinkValue = InternalResolvedLinkValue | ExternalLinkValue | CustomLinkValue | PageLinkValue | EntryLinkValue;
export type PersistableNavigationLinkError = {
    type: 'internalLinkNotResolved';
    routeId: string;
};
export type PersistableNavigationLinkResult = {
    ok: true;
    value: PersistableNavigationLinkValue;
} | {
    ok: false;
    error: PersistableNavigationLinkError;
};
export declare function toInternalLinkValue(item: RoutableContentItem): LinkValue;
export declare function toPersistableNavigationLinkValue(value: LinkValue): PersistableNavigationLinkResult;
export declare function linkValueToPayload(value: PersistableNavigationLinkValue): LinkPayload;
export declare function linkPayloadToValue(payload: LinkPayload | null | undefined, items?: RoutableContentItem[]): LinkValue | null;
