/**
 * Content route matching utilities.
 *
 * Derive route matching from SDK config to determine whether a URL path
 * is a CMS page or a content entry, without duplicating route patterns.
 */
import type { ContentTypeRoutingInfo } from '../public-api/contracts';
import type { RiverbankSiteConfig } from '../config';
type ContentEntryPrefixSource = Readonly<{
    hasPages: boolean;
    routePattern?: string | null;
}>;
/**
 * Extract the first path segment from each routable content type's routePattern.
 *
 * Use this when you already have a content type array and want the same prefix
 * derivation behavior used by runtime routing helpers and generated config files.
 */
export declare function getContentEntryPrefixesFromContentTypes(contentTypes: readonly ContentEntryPrefixSource[]): string[];
/**
 * Extract the first path segment from each routable content type's routePattern.
 *
 * Useful for simple prefix-based routing decisions. For more precise matching
 * that handles nested patterns, use `isContentEntryPath` instead.
 *
 * @param config - The SDK config object from defineConfig()
 * @returns Array of first path segments from content type routePatterns
 *
 * @example
 * ```typescript
 * import { getContentEntryPrefixes } from '@riverbankcms/sdk/routing';
 * import config from '../riverbank.config';
 *
 * // Config with routePatterns: '/blog/{slug}', '/work/projects/{slug}'
 * const prefixes = getContentEntryPrefixes(config);
 * // Returns ['blog', 'work']
 * ```
 */
export declare function getContentEntryPrefixes(config: RiverbankSiteConfig): string[];
/**
 * Result of checking if a path matches a content entry route.
 */
export type ContentEntryMatch = {
    /** Whether the path matches a content entry route pattern */
    isEntry: boolean;
    /** The content type key if matched (e.g., 'blog-post') */
    contentType?: string;
    /** The slug extracted from the path if matched */
    slug?: string;
};
/**
 * Check if a URL path matches any content entry route pattern.
 *
 * This is the core matching function that works with ContentTypeRoutingInfo[].
 * Use this when you have resolved content types from the API or merged sources.
 *
 * **Note:** Content types are checked in array order. If multiple patterns
 * could match a path, the first matching content type wins.
 *
 * @param contentTypes - Array of content type routing info
 * @param path - URL path as string ('/blog/my-post') or segments ['blog', 'my-post']
 * @returns Match result with content type and slug if matched
 *
 * @example
 * ```typescript
 * import { matchContentEntryPath } from '@riverbankcms/sdk/routing';
 *
 * const contentTypes = [
 *   { key: 'blog-post', hasPages: true, routePattern: '/blog/{slug}' },
 *   { key: 'project', hasPages: true, routePattern: '/work/projects/{slug}' },
 * ];
 *
 * matchContentEntryPath(contentTypes, '/blog/my-post');
 * // Returns { isEntry: true, contentType: 'blog-post', slug: 'my-post' }
 * ```
 */
export declare function matchContentEntryPath(contentTypes: ContentTypeRoutingInfo[], path: string | string[]): ContentEntryMatch;
/**
 * Check if a URL path matches any content entry route pattern.
 *
 * Supports nested patterns like '/work/projects/{slug}'. Returns the matched
 * content type key and extracted slug, useful for routing decisions.
 *
 * **Note:** Content types are checked in array order. If multiple patterns
 * could match a path, the first matching content type wins. Order more specific
 * patterns before generic ones in your config.
 *
 * @param config - The SDK config object from defineConfig()
 * @param path - URL path as string ('/blog/my-post') or segments ['blog', 'my-post']
 * @returns Match result with content type and slug if matched
 *
 * @example
 * ```typescript
 * import { isContentEntryPath } from '@riverbankcms/sdk/routing';
 * import config from '../riverbank.config';
 *
 * // Simple pattern: '/blog/{slug}'
 * isContentEntryPath(config, '/blog/my-post');
 * // Returns { isEntry: true, contentType: 'blog-post', slug: 'my-post' }
 *
 * // Nested pattern: '/work/projects/{slug}'
 * isContentEntryPath(config, '/work/projects/website-redesign');
 * // Returns { isEntry: true, contentType: 'project', slug: 'website-redesign' }
 *
 * // Non-matching path
 * isContentEntryPath(config, '/about');
 * // Returns { isEntry: false }
 * ```
 */
export declare function isContentEntryPath(config: RiverbankSiteConfig, path: string | string[]): ContentEntryMatch;
export {};
