/**
 * Shared types for template binding resolution.
 *
 * Used by SDK, site-renderer, and dashboard for resolving
 * bindings in template blocks to actual content values.
 */
export type BindingSource = 'field' | 'meta' | 'literal' | 'transform' | 'fallback';
type BindingLeaf = string | number | boolean | bigint | symbol | null | undefined | Date;
type StringKeyOf<T> = Extract<keyof T, string>;
type NestedBindingPath<T> = T extends BindingLeaf | readonly unknown[] | ((...args: never[]) => unknown) ? never : {
    [TKey in StringKeyOf<T>]: NonNullable<T[TKey]> extends BindingLeaf | readonly unknown[] | ((...args: never[]) => unknown) ? TKey : NonNullable<T[TKey]> extends Record<string, unknown> ? TKey | `${TKey}.${NestedBindingPath<NonNullable<T[TKey]>>}` : TKey;
}[StringKeyOf<T>];
export type BindingPath<T extends Record<string, unknown>> = NestedBindingPath<T>;
export type BindingTransformName = string;
export type KnownBindingTransformName = typeof TRANSFORMS[keyof typeof TRANSFORMS];
export type FieldBindingDescriptor<TPath extends string = string> = {
    source: 'field';
    path: TPath;
};
export type MetaBindingDescriptor<TPath extends string = string> = {
    source: 'meta';
    path: TPath;
};
export type LiteralBindingDescriptor<TValue = unknown> = {
    source: 'literal';
    value: TValue;
};
export type TransformBindingDescriptor<TTransform extends BindingTransformName = BindingTransformName> = {
    source: 'transform';
    transform: TTransform;
    input?: BindingInput;
    path?: string;
};
export type FallbackBindingDescriptor = {
    source: 'fallback';
    options: BindingInput[];
};
export type BindingDescriptor = FieldBindingDescriptor | MetaBindingDescriptor | LiteralBindingDescriptor | TransformBindingDescriptor | FallbackBindingDescriptor;
export type BindingInput = BindingDescriptor | string | Record<string, unknown>;
export type BindingMap = Record<string, unknown>;
/**
 * Context for resolving bindings - provides access to entry content and metadata.
 */
export type BindingContext<TFields extends Record<string, unknown> = Record<string, unknown>, TMeta extends Record<string, unknown> = Record<string, unknown>> = {
    /** Entry content fields (e.g., { body: ..., image: ... }) */
    fields: TFields;
    /** Entry metadata (id, title, slug, path, publishAt, status, createdAt, updatedAt) */
    meta: TMeta;
};
/**
 * Available transform function names.
 *
 * Keep in sync with:
 * - @riverbankcms/sdk `BINDING_TRANSFORMS`
 * - @riverbankcms/content-model `TEMPLATE_BINDING_TRANSFORMS`
 */
export declare const TRANSFORMS: {
    readonly RICHTEXT_FIRST_PARAGRAPH: "richtext.firstParagraph";
    readonly DATE_FORMAT_SHORT: "date.formatShort";
    readonly DATE_FORMAT_LONG: "date.formatLong";
};
export declare const BINDING_SOURCES: BindingSource[];
export {};
