import { type ReactNode, type ComponentType } from "react";
import { type AppShellProps } from "../shell/AppShell";
import type { PortalErrorReporter } from "../errors/portal-error-reporter";
import type { FluidSDKConfig } from "../types/config";
import type { WidgetManifest } from "@fluid-app/portal-core/registries";
import type { WidgetPackageDescriptor } from "../types/widget-package-descriptor";
/**
 * Configuration for `createPortal()`.
 *
 * Provides a single-call entry point that sets up the provider hierarchy
 * with sensible defaults. Every field is optional.
 */
export interface PortalConfig {
    /** Custom page components keyed by navigation slug */
    customPages?: Record<string, ComponentType<{
        slug?: string;
        params?: string;
    }>>;
    /** Custom widget manifests (type + component + propertySchema) */
    customWidgets?: WidgetManifest[];
    /** Trusted remote widget packages to load at runtime. */
    widgetPackages?: readonly WidgetPackageDescriptor[];
    /**
     * Whether to merge widgets already registered on `window.FluidWidgets` during
     * portal bootstrap. Set to `false` when the host owns the global registry but
     * should not expose those registrations to this portal instance.
     * @default true
     */
    ingestPreRegisteredWidgets?: boolean;
    /**
     * Runtime widget package descriptor endpoint.
     *
     * Set to `false` to disable descriptor fetching. Explicit `widgetPackages`
     * still load when descriptor fetching is disabled. When omitted, descriptor
     * fetching defaults to the hosted portal catalog endpoint in production and
     * the Vite dev descriptor endpoint during Vite development.
     */
    widgetPackageManifestUrl?: string | false;
    /**
     * Additional trusted origins for assets referenced by fetched widget package
     * descriptors.
     */
    widgetPackageAllowedOrigins?: readonly string[];
    /** API client config overrides (merged with defaults) */
    fluid?: Partial<FluidSDKConfig>;
    /** Root element ID. @default "root" */
    rootId?: string;
    /** AppShell props passthrough (basePath, sidebarHeader, etc.) */
    shell?: Omit<AppShellProps, "customPages" | "errorReporter">;
    /** Wrap AppShell with additional providers (inserted inside RequireAuth, below FluidProvider) */
    providers?: ComponentType<{
        children: ReactNode;
    }>;
    /** Optional reporter for root and screen error boundaries (for example, Sentry.captureException). */
    errorReporter?: PortalErrorReporter;
    /** Disable StrictMode. @default false */
    disableStrictMode?: boolean;
}
/**
 * Bootstrap a Fluid portal with a single function call.
 *
 * Sets up the provider hierarchy (FluidProvider → AppShell) and renders into the DOM.
 * Auth is handled server-side by Rails before the SPA loads.
 *
 * @example Minimal usage
 * ```ts
 * import "./index.css";
 *
 * createPortal();
 * ```
 *
 * @example With custom pages
 * ```ts
 * import { customPages } from "./portal.config";
 * import "./index.css";
 *
 * createPortal({ customPages });
 * ```
 *
 * @example With overrides
 * ```ts
 * createPortal({
 *   customPages,
 *   fluid: { baseUrl: "https://my-api.example.com" },
 *   shell: { basePath: "/portal" },
 * });
 * ```
 */
export declare function createPortal(config?: PortalConfig): void;
//# sourceMappingURL=create-portal.d.ts.map