import { R as RiverbankClient } from './types-CAnC529E.js';
import { a as LoadPageResult } from './loadPage-BElEkA_J.js';
import './types-5XdVD2J1.js';
import '@riverbankcms/ai';
import './schema-Bpy9N5ZI.js';
import 'zod';
import '@riverbankcms/media-storage-supabase';
import '@riverbankcms/db';
import 'react/jsx-runtime';
import 'react';
import './types-DSFvXKhO.js';
import './blockKinds-B6MWzNWp.js';

/**
 * Route resolution helper for dynamic page routing
 *
 * Resolves URL paths to pages, entries, redirects, or 404s.
 */

type RouteResolution = {
    type: 'page';
    pageData: LoadPageResult;
} | {
    type: 'redirect';
    destination: string;
    permanent: boolean;
} | {
    type: 'not-found';
};
type ResolveRouteParams = {
    /**
     * Builder client instance
     */
    client: RiverbankClient;
    /**
     * Site ID
     */
    siteId: string;
    /**
     * URL path to resolve (e.g., '/about', '/blog/post-1')
     */
    path: string;
    /**
     * If true, fetches draft/unpublished content instead of published content.
     * @default false
     */
    preview?: boolean;
};
/**
 * Resolve a URL path to page data, redirect, or 404
 *
 * This helper attempts to fetch the page at the given path and returns
 * a discriminated union indicating whether the page was found or not.
 *
 * **Note:** Redirect support is not yet implemented. The `redirect` type
 * exists in the return type for future compatibility, but this function
 * currently only returns `page` or `not-found` types.
 *
 * @example
 * ```tsx
 * import { resolveRoute } from '@riverbankcms/sdk/routing';
 * import { notFound, redirect } from 'next/navigation';
 *
 * export default async function DynamicPage({ params }) {
 *   const path = `/${params.slug?.join('/') || ''}`;
 *   const resolution = await resolveRoute({
 *     client,
 *     siteId: 'your-site-id',
 *     path,
 *   });
 *
 *   if (resolution.type === 'redirect') {
 *     redirect(resolution.destination);
 *   }
 *
 *   if (resolution.type === 'not-found') {
 *     notFound();
 *   }
 *
 *   // resolution.type === 'page'
 *   return <Page {...resolution.pageData} />;
 * }
 * ```
 */
declare function resolveRoute(params: ResolveRouteParams): Promise<RouteResolution>;
/**
 * Batch resolve multiple routes in parallel
 *
 * Useful for pre-fetching multiple routes or validating a sitemap.
 *
 * @example
 * ```tsx
 * const resolutions = await resolveRoutes({
 *   client,
 *   siteId: 'your-site-id',
 *   paths: ['/', '/about', '/blog', '/contact'],
 * });
 *
 * resolutions.forEach(({ path, resolution }) => {
 *   if (resolution.type === 'page') {
 *     console.log(`${path} → Page: ${resolution.pageData.page.name}`);
 *   } else if (resolution.type === 'redirect') {
 *     console.log(`${path} → Redirect to ${resolution.destination}`);
 *   } else {
 *     console.log(`${path} → Not found`);
 *   }
 * });
 * ```
 */
declare function resolveRoutes(params: {
    client: RiverbankClient;
    siteId: string;
    paths: string[];
    preview?: boolean;
}): Promise<Array<{
    path: string;
    resolution: RouteResolution;
}>>;

export { type ResolveRouteParams, type RouteResolution, resolveRoute, resolveRoutes };
