import type { ReactNode } from 'react';
import type { Theme } from '../../blocks/src/index';
import { type MediaEditorProviderProps } from '../../media-editor/src/index';
import { type LinkWidgetAdapters } from './widgets/link';
import { type OnPickImage } from './widgets/rich-text';
import { type ReferenceWidgetAdapters } from './widgets/reference';
/**
 * Unified Form Provider
 *
 * Composes all widget context providers (Link, Media, RichText) into a single provider.
 * This eliminates the need for manual provider nesting and ensures consistent setup.
 *
 * Apps should create thin wrappers around this provider that supply app-specific configs.
 *
 * @example
 * ```tsx
 * // Dashboard usage
 * <FormProvider
 *   siteId={siteId}
 *   theme={theme}
 *   mediaConfig={{ repo, uploader, bearerToken }}
 *   linkConfig={{ adapters: dashboardLinkWidgetAdapters }}
 *   onPickImage={onPickImage}
 * >
 *   <ManifestForm manifest={manifest} widgetOverrides={widgetOverrides} />
 * </FormProvider>
 * ```
 */
export type FormProviderProps = {
    /** Site ID for all widgets */
    siteId: string;
    /** Theme for rich text editor preview */
    theme?: Theme | null;
    /** Media editor configuration (all props except children and siteId) */
    mediaConfig: Omit<MediaEditorProviderProps, 'children' | 'siteId'>;
    /** Link widget configuration */
    linkConfig?: {
        adapters?: LinkWidgetAdapters;
    };
    /** Reference widget configuration */
    referenceConfig?: {
        adapters?: ReferenceWidgetAdapters;
    };
    /** Image picker callback for rich text editor */
    onPickImage: OnPickImage;
    /** Child components (typically ManifestForm or BlockForm) */
    children: ReactNode;
};
/**
 * Unified form provider that sets up all widget contexts.
 *
 * Nesting order (outer to inner):
 * 1. LinkWidgetProvider - Link field context
 * 2. ReferenceWidgetProvider - Reference/relation field context
 * 3. MediaEditorProvider - Media upload and repository
 * 4. RichTextWidgetProvider - Rich text theme and image picker
 */
export declare function FormProvider({ siteId, theme, mediaConfig, linkConfig, referenceConfig, onPickImage, children, }: FormProviderProps): import("react/jsx-runtime").JSX.Element;
