export declare const ROUTE_TEMPLATE_SLUG_SEGMENT: "{slug}";
export type FallbackSlugRouteTemplate = Readonly<{
    kind: 'fallback-slug';
}>;
export type FixedPathRouteTemplate = Readonly<{
    kind: 'fixed-path';
    routePattern: string;
    path: string;
}>;
export type SlugRouteTemplate = Readonly<{
    kind: 'slug-template';
    routePattern: string;
    prefix: string;
    suffix: string;
    prefixSegments: readonly string[];
    suffixSegments: readonly string[];
}>;
export type RouteTemplate = FallbackSlugRouteTemplate | FixedPathRouteTemplate | SlugRouteTemplate;
export type RouteTemplateParseErrorCode = 'legacy-dynamic-segment' | 'multiple-slug-segments' | 'unsupported-dynamic-segment';
export type RouteTemplateParseError = Readonly<{
    code: RouteTemplateParseErrorCode;
    routePattern: string;
    segment: string | null;
}>;
export type RouteTemplateParseResult = Readonly<{
    success: true;
    routeTemplate: RouteTemplate;
}> | Readonly<{
    success: false;
    error: RouteTemplateParseError;
}>;
export declare class InvalidRouteTemplateError extends Error {
    readonly error: RouteTemplateParseError;
    constructor(error: RouteTemplateParseError);
}
export declare function safeParseRouteTemplate(routePattern: string | null): RouteTemplateParseResult;
export declare function parseRouteTemplate(routePattern: string | null): RouteTemplate;
export declare function isSlugTemplate(routeTemplate: RouteTemplate): routeTemplate is SlugRouteTemplate;
export declare function fixedPathOrNull(routeTemplate: RouteTemplate): string | null;
/** Returns the first path segment, or undefined when the template has no fixed prefix segment. */
export declare function getRouteTemplatePrefix(routeTemplate: RouteTemplate): string | undefined;
export declare function expandSlug(routeTemplate: RouteTemplate, slug: string): string;
export declare function describeRouteTemplateParseError(error: RouteTemplateParseError): string;
