/**
 * Pluggable canvas renderers for custom section types.
 *
 * By default the editor canvas renders custom (config-declared) and unmanaged
 * section types as structural placeholders. Projects that want a real design
 * preview inside the admin can pass renderers to `<AdminRoot
 * sectionRenderers={...}>`; the canvas and the eye preview then use them in
 * place of the placeholder.
 *
 * The renderer signature is a structural mirror of `SectionRenderer` from
 * `@actuate-media/sections-react` (cms-admin depends on cms-core only, so the
 * type is duplicated rather than imported). Because the shapes match, a
 * consumer can hand `AdminRoot` the exact same components it registers for
 * the public site:
 *
 * ```tsx
 * import { OPAL_RENDERERS } from './sections' // SectionRendererMap
 * <AdminRoot sectionRenderers={OPAL_RENDERERS} ... />
 * ```
 *
 * Renderers run inside the admin bundle, so they must be client-safe (no
 * server-only imports). Each one is wrapped in an error boundary — a throwing
 * renderer falls back to the structural placeholder instead of taking down
 * the editor.
 */
import { type ReactNode } from 'react';
/** Structural mirror of `RenderImageProps` from `@actuate-media/sections-react`. */
export interface AdminRenderImageProps {
    src: string;
    alt: string;
    width?: number | null;
    height?: number | null;
    className?: string;
    priority?: boolean;
    sizes?: string;
}
/** Structural mirror of `PostContext` from `@actuate-media/sections-react`. */
export interface AdminSectionPostContext {
    title?: string;
    excerpt?: string;
    body?: string;
    featuredImageUrl?: string;
    publishDate?: string | null;
    category?: string;
    author?: {
        name?: string;
        bio?: string;
        avatarUrl?: string;
    };
    relatedPosts?: Array<{
        title: string;
        url?: string;
        excerpt?: string;
    }>;
}
/** Props passed to an admin section renderer (mirrors `SectionRendererProps`). */
export interface AdminSectionRendererProps {
    section: {
        id: string;
        sectionType: string;
        name?: string;
        visible?: boolean;
        content?: Record<string, unknown>;
        settings?: Record<string, unknown>;
    };
    ctx?: AdminSectionPostContext;
    options: {
        sanitizeHtml: (html: string) => string;
        baseUrl: string;
        renderImage: (props: AdminRenderImageProps) => ReactNode;
    };
}
/** A canvas renderer for one custom section type. */
export type AdminSectionRenderer = (props: AdminSectionRendererProps) => ReactNode;
/** Section-type id → canvas renderer. */
export type AdminSectionRendererMap = Record<string, AdminSectionRenderer>;
/**
 * Render options passed to every admin renderer. Rich text is sanitized on
 * write by cms-core, so the canvas (same trust domain as the public default)
 * uses the identity sanitizer; images render as plain lazy `<img>` since the
 * editor canvas has no next/image pipeline.
 */
export declare const ADMIN_RENDER_OPTIONS: AdminSectionRendererProps['options'];
export declare const AdminSectionRenderersProvider: import("react").Provider<AdminSectionRendererMap>;
/** The renderer map passed to `<AdminRoot sectionRenderers>` (empty by default). */
export declare function useAdminSectionRenderers(): AdminSectionRendererMap;
//# sourceMappingURL=admin-renderers.d.ts.map