import { ComponentType, ReactNode } from 'react';
import { a as ComponentRegistry, P as PropValue } from '../../../../shared/stack.EhM4pmtN.js';
import * as react_jsx_runtime from 'react/jsx-runtime';
import 'zod';
import '../../../../shared/stack.8nldKomx.js';
import 'react-hook-form';

interface PageRendererProps {
    /** URL slug of the UI Builder page to render */
    slug: string;
    /** Component registry to use for rendering (defaults to defaultComponentRegistry) */
    componentRegistry?: ComponentRegistry;
    /** Runtime variable values to override defaults */
    variableValues?: Record<string, PropValue>;
    /** Custom loading component */
    LoadingComponent?: ComponentType;
    /** Custom error component */
    ErrorComponent?: ComponentType<{
        error: Error;
    }>;
    /** Custom not found component */
    NotFoundComponent?: ComponentType;
    /** Additional className for the container */
    className?: string;
}
/**
 * PageRenderer - Renders a UI Builder page by slug
 *
 * A convenient component for rendering UI Builder pages on public-facing routes.
 * Handles loading states, error boundaries, and 404 cases automatically.
 *
 * @example
 * ```tsx
 * // Basic usage with default registry
 * import { PageRenderer } from "@btst/stack/plugins/ui-builder/client"
 *
 * export default function Page({ params }: { params: { slug: string } }) {
 *   return <PageRenderer slug={params.slug} />
 * }
 * ```
 *
 * @example
 * ```tsx
 * // With custom component registry
 * import { PageRenderer, createComponentRegistry } from "@btst/stack/plugins/ui-builder/client"
 * import { defaultComponentRegistry } from "@btst/stack/plugins/ui-builder/client"
 *
 * const customRegistry = createComponentRegistry({
 *   ...defaultComponentRegistry,
 *   MyCustomComponent: { component: MyComponent, schema: mySchema },
 * })
 *
 * export default function Page({ params }: { params: { slug: string } }) {
 *   return (
 *     <PageRenderer
 *       slug={params.slug}
 *       componentRegistry={customRegistry}
 *     />
 *   )
 * }
 * ```
 *
 * @example
 * ```tsx
 * // With variable values for dynamic content
 * import { PageRenderer } from "@btst/stack/plugins/ui-builder/client"
 *
 * export default function Page({ params }: { params: { slug: string } }) {
 *   const user = useCurrentUser()
 *
 *   return (
 *     <PageRenderer
 *       slug={params.slug}
 *       variableValues={{
 *         userName: user?.name ?? "Guest",
 *         isLoggedIn: !!user,
 *       }}
 *     />
 *   )
 * }
 * ```
 */
declare function PageRenderer({ slug, componentRegistry, variableValues, LoadingComponent, ErrorComponent, NotFoundComponent, className, }: PageRendererProps): ReactNode;
/**
 * SuspensePageRenderer - Suspense-based PageRenderer for SSR
 *
 * Similar to PageRenderer but designed for use with React Suspense streaming.
 * Use this when you want the server to wait for the page data before sending HTML.
 *
 * This component uses `useSuspenseQuery` internally, which throws a promise
 * while data is loading. This allows React Suspense boundaries to properly
 * catch the loading state and enables SSR streaming.
 *
 * @example
 * ```tsx
 * import { Suspense } from "react"
 * import { SuspensePageRenderer } from "@btst/stack/plugins/ui-builder/client"
 *
 * export default function Page({ params }: { params: { slug: string } }) {
 *   return (
 *     <Suspense fallback={<PageSkeleton />}>
 *       <SuspensePageRenderer slug={params.slug} />
 *     </Suspense>
 *   )
 * }
 * ```
 */
declare function SuspensePageRenderer({ slug, componentRegistry, variableValues, NotFoundComponent, className, }: Omit<PageRendererProps, "LoadingComponent" | "ErrorComponent">): ReactNode;

declare function PageListPage(): react_jsx_runtime.JSX.Element;

interface PageBuilderPageProps {
    id?: string;
}
declare function PageBuilderPage({ id }: PageBuilderPageProps): react_jsx_runtime.JSX.Element;

export { PageBuilderPage, PageListPage, PageRenderer, SuspensePageRenderer };
export type { PageRendererProps };
