/**
 * Standard bindings for blocks that require API access.
 *
 * Blocks that hydrate on the client and make API calls (forms, booking,
 * events, shop, etc.) need siteId and apiBaseUrl passed from
 * the server context. This helper ensures these bindings are never forgotten.
 *
 * @example
 * ```tsx
 * import { withApiBindings } from '../helpers/api-bindings'
 *
 * // In block layout definition:
 * el('shop', withApiBindings({
 *   showCart: true,
 *   showProducts: true,
 * }))
 * ```
 */
/**
 * Binding object shape used in block layouts.
 * Maps to values from the $root context at render time.
 */
export type ApiBinding = {
    $bind: {
        from: string;
        fallback?: unknown;
    };
};
/**
 * Standard API bindings that all interactive blocks need.
 */
export declare const apiBindings: {
    readonly siteId: {
        readonly $bind: {
            readonly from: "$root.siteId";
        };
    };
    readonly apiBaseUrl: {
        readonly $bind: {
            readonly from: "$root.apiBaseUrl";
        };
    };
};
export type WithApiBindingsOptions = {
    /**
     * Whether to include `apiBaseUrl` binding.
     *
     * Some blocks use the Block API Client via `BlockApiProvider` and no longer
     * need `apiBaseUrl` passed as a prop.
     */
    includeApiBaseUrl?: boolean;
};
/**
 * Merge API bindings with block-specific props.
 *
 * Use this for any block that hydrates and makes API calls.
 * The helper ensures siteId and apiBaseUrl are always included,
 * preventing runtime errors from missing bindings.
 *
 * @param props - Block-specific props to merge with API bindings
 * @returns Props with siteId and apiBaseUrl bindings included
 */
export declare function withApiBindings<T extends Record<string, unknown>>(props: T, options: {
    includeApiBaseUrl: false;
}): T & Pick<typeof apiBindings, 'siteId'>;
export declare function withApiBindings<T extends Record<string, unknown>>(props: T, options?: WithApiBindingsOptions): T & typeof apiBindings;
