/**
 * Core UMD entry — seekora-react-sdk.core.umd.js
 *
 * Exposes the essential runtime: SearchProvider, layout engine, error boundary,
 * SeekoraClient adapter, and the primitive registry (including registerPrimitive).
 * Filter and suggestions modules lazy-load separately and call
 * window.SeekoraReact.registerPrimitive(name, component) at load time to
 * populate the runtime registry.
 *
 * SCRUM-268
 */
import React from "react";
import { createRoot } from "react-dom/client";
// Core search primitives used in every surface
import { ImageDisplay } from "./components/primitives/ImageDisplay";
import { PriceDisplay } from "./components/primitives/PriceDisplay";
import { BadgeList } from "./components/primitives/BadgeList";
import { VariantSwatches } from "./components/primitives/VariantSwatches";
import { ActionButtons } from "./components/primitives/ActionButtons";
import { AddToCartButton } from "./components/primitives/AddToCartButton";
// Core chrome components
import { Pagination } from "./components/Pagination";
import { SortBy } from "./components/SortBy";
import { Stats } from "./components/Stats";
import { CurrentRefinements } from "./components/CurrentRefinements";
import { ClearRefinements } from "./components/ClearRefinements";
import { MobileFiltersButton } from "./components/MobileFilters";
import { SearchLayout } from "./components/SearchLayout";
// Single-tree SearchProvider
import { SeekoraClient } from "@seekora-ai/search-sdk";
import { SearchProvider } from "./components/SearchProvider";
import { SearchStateManager } from "@seekora-ai/ui-sdk-core";
import { useSearchState } from "./hooks/useSearchState";
// Error Boundary
import { SeekoraErrorBoundary } from "./components/ErrorBoundary";
// Storefront Layout Engine
import { mountLayout } from "./layout/mount";
import { LayoutRenderer } from "./layout/LayoutRenderer";
import { registerPrimitive, listPrimitives, PRIMITIVE_REGISTRY, } from "./layout/primitive-registry-core";
import { validateLayoutConfig } from "./layout/validate-config";
export { React, createRoot, 
// Core UI primitives
ImageDisplay, PriceDisplay, BadgeList, VariantSwatches, ActionButtons, AddToCartButton, 
// Core chrome
Pagination, SortBy, Stats, CurrentRefinements, ClearRefinements, MobileFiltersButton, SearchLayout, 
// Search engine
SeekoraClient, SearchProvider, SearchStateManager, useSearchState, 
// Error Boundary
SeekoraErrorBoundary, 
// Layout Engine
mountLayout, LayoutRenderer, registerPrimitive, listPrimitives, PRIMITIVE_REGISTRY, validateLayoutConfig, };
// ---------------------------------------------------------------------------
// Core mount helpers
// ---------------------------------------------------------------------------
export function mountPagination(el, props) {
    const root = createRoot(el);
    root.render(React.createElement(Pagination, props));
    return { unmount: () => root.unmount() };
}
export function mountSortBy(el, props) {
    const root = createRoot(el);
    root.render(React.createElement(SortBy, props));
    return { unmount: () => root.unmount() };
}
export function mountStats(el, props) {
    const root = createRoot(el);
    root.render(React.createElement(Stats, props));
    return { unmount: () => root.unmount() };
}
export function mountCurrentRefinements(el, props) {
    const root = createRoot(el);
    root.render(React.createElement(CurrentRefinements, props));
    return { unmount: () => root.unmount() };
}
export function mountClearRefinements(el, props) {
    const root = createRoot(el);
    root.render(React.createElement(ClearRefinements, props));
    return { unmount: () => root.unmount() };
}
