const require_chunk = require("./chunk-9hOWP6kD.cjs");
const require_registry_context = require("./registry-context-D737a2Jb.cjs");
const require_shell_translation_api_context = require("./shell-translation-api-context-BxZ1W6Eb.cjs");
let react = require("react");
react = require_chunk.__toESM(react);
let _tanstack_react_query = require("@tanstack/react-query");
let react_jsx_runtime = require("react/jsx-runtime");
//#region ../core/src/data-source-api-context.ts
const DataSourceApiContext = (0, react.createContext)(null);
const DataSourceApiProvider = DataSourceApiContext.Provider;
/**
* Access the DataSourceApi adapter without throwing.
* Returns null when no DataSourceApiProvider ancestor exists.
* Use in isolated rendering contexts (Storybook, unit tests) where the
* full provider stack may not be wired.
*/
function useDataSourceApiOptional() {
	return (0, react.use)(DataSourceApiContext);
}
//#endregion
//#region ../widgets/src/contexts/RegistryContext.tsx
/**
* Context for providing the widget registry to all components in the tree.
* This eliminates prop drilling and makes the registry accessible anywhere.
*
* Default to undefined - registry must be provided by a RegistryProvider.
*/
const RegistryContext = (0, react.createContext)(void 0);
/**
* Provider component that makes the widget registry available to all descendants.
* A registry must be provided either via props or by nesting within another RegistryProvider.
*/
function RegistryProvider({ registry, children }) {
	const parentRegistry = (0, react.useContext)(RegistryContext);
	const contextValue = registry ?? parentRegistry;
	if (!contextValue) throw new Error("RegistryProvider requires a registry prop or must be nested within another RegistryProvider.");
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RegistryContext.Provider, {
		value: contextValue,
		children
	});
}
/**
* Hook to access the widget registry from anywhere in the component tree.
* Must be used within a RegistryProvider that has a registry prop.
*/
function useRegistry() {
	const registry = (0, react.useContext)(RegistryContext);
	if (!registry) throw new Error("useRegistry must be used within a RegistryProvider with a registry prop.");
	return registry;
}
//#endregion
//#region ../widgets/src/contexts/ScreenRendererContext.tsx
/**
* Context for providing an alternative ScreenRenderer component.
*
* This allows packages like portal-builder to inject their own ScreenRenderer
* (with edit mode, drag-and-drop, etc.) so that container widgets in portal-widgets
* use the richer renderer instead of the basic view-only one.
*
* Default is undefined — container widgets fall back to the local ScreenRenderer import.
*/
const ScreenRendererContext = (0, react.createContext)(void 0);
/**
* Hook to get the ScreenRenderer component from context.
* Returns undefined if no override has been provided.
*/
function useScreenRenderer() {
	return (0, react.useContext)(ScreenRendererContext);
}
//#endregion
//#region ../core/src/types/widget-schema.ts
/**
* Widget type names as a const object.
* This serves as the single source of truth for widget discriminants.
* Use `as const` for literal type inference (safety-as-const-deep-readonly rule).
*/
const WIDGET_TYPE_NAMES = {
	Alert: "AlertWidget",
	BulletList: "BulletListWidget",
	Calendar: "CalendarWidget",
	Card: "CardWidget",
	Carousel: "CarouselWidget",
	CatchUp: "CatchUpWidget",
	Chart: "ChartWidget",
	Container: "ContainerWidget",
	Embed: "EmbedWidget",
	Image: "ImageWidget",
	Layout: "LayoutWidget",
	Link: "LinkWidget",
	List: "ListWidget",
	MySite: "MySiteWidget",
	Nested: "NestedWidget",
	Points: "PointsWidget",
	QuickLinks: "QuickLinksWidget",
	QuickShare: "QuickShareWidget",
	RecentActivity: "RecentActivityWidget",
	Separator: "SeparatorWidget",
	Shop: "ShopWidget",
	Spacer: "SpacerWidget",
	Table: "TableWidget",
	Text: "TextWidget",
	ToDo: "ToDoWidget",
	Video: "VideoWidget"
};
/**
* Type predicate to check if a string is a known widget type name.
* Use for runtime validation of widget types.
*
* @example
* if (isWidgetTypeName(widget.type)) {
*   // TypeScript knows widget.type is WidgetTypeName
* }
*/
function isWidgetTypeName(type) {
	return Object.values(WIDGET_TYPE_NAMES).includes(type);
}
/**
* Type predicate to check if a widget has a specific type.
* Enables type-safe widget narrowing without `as` assertions.
*
* @example
* if (isWidgetType(widget, "LayoutWidget")) {
*   // TypeScript knows widget.type === "LayoutWidget"
*   // and widget.props is LayoutWidget props
* }
*/
function isWidgetType(widget, typeName) {
	return widget != null && widget.type === typeName;
}
/**
* Helper for exhaustive switch statements on widget types.
* Use in the default case to ensure all widget types are handled.
*
* @example
* switch (widget.type) {
*   case "AlertWidget": return handleAlert();
*   case "TextWidget": return handleText();
*   // ... all other widget types
*   default: return assertNever(widget.type, "widget type");
* }
*/
function assertNever(value, context) {
	const message = context ? `Unexpected ${context}: ${String(value)}` : `Unexpected value: ${String(value)}`;
	throw new Error(message);
}
/**
* Assertion function that throws if value is undefined.
* Narrows the type to exclude undefined.
*
* @example
* const widget = screen[0];
* assertDefined(widget, "widget at index 0");
* // TypeScript knows widget is defined here
*/
function assertDefined(value, name) {
	if (value == null) throw new Error(name ? `${name} is required` : "Value is required");
}
/** Lookup map for O(1) preset resolution */
const PRESET_MAP = new Map([
	{
		id: "rep-most-shared",
		name: "Most Shared Visits",
		description: "Content with the most share-link click-throughs",
		endpoint: "/v2025-06/reps/{rep_id}/most_shared?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
		resultPath: "resources",
		compatibleWidgets: [
			"CarouselWidget",
			"ListWidget",
			"NestedWidget",
			"ShopWidget"
		],
		widgetVariables: { ShopWidget: { shareable_type: "products" } },
		menuField: {
			key: "shareable_type",
			label: "Content Type",
			type: "select",
			options: [
				{
					label: "Products",
					value: "products"
				},
				{
					label: "Media",
					value: "media"
				},
				{
					label: "Pages",
					value: "pages"
				},
				{
					label: "Libraries",
					value: "libraries"
				},
				{
					label: "Enrollment Packs",
					value: "enrollment_packs"
				}
			],
			defaultValue: "products"
		},
		configFields: [{
			key: "limit",
			label: "Limit",
			type: "number",
			defaultValue: 10,
			min: 1,
			max: 20,
			description: "Maximum number of items to show"
		}, {
			key: "period",
			label: "Time Range",
			type: "select",
			options: [
				{
					label: "7 days",
					value: "7d"
				},
				{
					label: "30 days",
					value: "30d"
				},
				{
					label: "90 days",
					value: "90d"
				},
				{
					label: "1 year",
					value: "1y"
				},
				{
					label: "All time",
					value: "all"
				}
			],
			defaultValue: "all"
		}]
	},
	{
		id: "rep-most-viewed",
		name: "Most Viewed",
		description: "Most viewed content",
		endpoint: "/v2025-06/reps/{rep_id}/most_viewed?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
		resultPath: "resources",
		compatibleWidgets: [
			"CarouselWidget",
			"ListWidget",
			"NestedWidget",
			"ShopWidget"
		],
		widgetVariables: { ShopWidget: { shareable_type: "products" } },
		menuField: {
			key: "shareable_type",
			label: "Content Type",
			type: "select",
			options: [
				{
					label: "Products",
					value: "products"
				},
				{
					label: "Media",
					value: "media"
				},
				{
					label: "Pages",
					value: "pages"
				},
				{
					label: "Libraries",
					value: "libraries"
				},
				{
					label: "Enrollment Packs",
					value: "enrollment_packs"
				}
			],
			defaultValue: "products"
		},
		configFields: [{
			key: "limit",
			label: "Limit",
			type: "number",
			defaultValue: 10,
			min: 1,
			max: 20,
			description: "Maximum number of items to show"
		}, {
			key: "period",
			label: "Time Range",
			type: "select",
			options: [
				{
					label: "7 days",
					value: "7d"
				},
				{
					label: "30 days",
					value: "30d"
				},
				{
					label: "90 days",
					value: "90d"
				},
				{
					label: "1 year",
					value: "1y"
				},
				{
					label: "All time",
					value: "all"
				}
			],
			defaultValue: "all"
		}]
	},
	{
		id: "customer-orders",
		name: "Orders",
		description: "Customer order history",
		endpoint: "/v202506/orders?customer_id={customer_id}&page[limit]={limit}&status={status}",
		resultPath: "orders",
		transform: "toOrderTableProps",
		compatibleWidgets: ["TableWidget"],
		configFields: [{
			key: "limit",
			label: "Limit",
			type: "number",
			defaultValue: 10,
			min: 1,
			max: 50,
			description: "Maximum number of orders to show"
		}, {
			key: "status",
			label: "Status",
			type: "select",
			options: [
				{
					label: "All",
					value: "all"
				},
				{
					label: "Paid",
					value: "paid"
				},
				{
					label: "Unpaid",
					value: "unpaid"
				},
				{
					label: "Refunded",
					value: "refunded"
				}
			],
			defaultValue: "all"
		}]
	},
	{
		id: "customer-subscriptions",
		name: "Subscriptions",
		description: "Customer subscriptions",
		endpoint: "/subscriptions?customer_id={customer_id}&per_page={limit}&status={status}",
		resultPath: "subscriptions",
		transform: "toSubscriptionTableProps",
		compatibleWidgets: ["TableWidget"],
		configFields: [{
			key: "limit",
			label: "Limit",
			type: "number",
			defaultValue: 10,
			min: 1,
			max: 50,
			description: "Maximum number of subscriptions to show"
		}, {
			key: "status",
			label: "Status",
			type: "select",
			options: [
				{
					label: "All",
					value: "all"
				},
				{
					label: "Active",
					value: "active"
				},
				{
					label: "Paused",
					value: "paused"
				},
				{
					label: "Cancelled",
					value: "cancelled"
				}
			],
			defaultValue: "all"
		}]
	}
].map((p) => [p.id, p]));
/**
* Resolves a preset by ID, returning the current preset definition.
* Returns undefined if the preset ID is not recognized.
*/
function resolvePreset(presetId) {
	return PRESET_MAP.get(presetId);
}
/**
* If the source is an API source with a presetId, returns a copy with
* endpoint, resultPath, and transform resolved from the current preset.
* Falls back to stored values if the preset is unknown.
* Non-API sources are returned as-is.
*/
function resolveSource(source) {
	if (source.type !== "api" || !source.presetId) return source;
	const preset = resolvePreset(source.presetId);
	if (!preset) {
		console.warn(`[DataSource] Unknown preset "${source.presetId}", falling back to stored values`);
		return source;
	}
	return {
		...source,
		endpoint: preset.endpoint,
		resultPath: preset.resultPath,
		transform: preset.transform ?? source.transform
	};
}
//#endregion
//#region ../core/src/data-sources/source-key.ts
/**
* Stable React Query cache key for the raw data fetch of a single source.
*
* Transforms and targetProps are intentionally excluded — they are applied
* per-widget after reading from the shared cache, so two widgets that share
* the same source can share a single fetch even when they consume the data
* differently. The builder's data-source preview reuses this key so the
* field's preview and the runtime widget hit the cache the same way.
*/
function getSourceKey(source) {
	if (source.type === "api") {
		const varsKey = source.variables ? `:${JSON.stringify(source.variables)}` : "";
		return `${source.presetId ?? source.endpoint}${varsKey}`;
	}
	if (source.type === "custom") return `custom:${(source.selectedItems?.map((item) => `${item.shareableType}:${item.id}`) ?? []).join(",")}`;
	if (source.type === "static") return `static:${source.staticType}:${source.selectedId}`;
	return "unknown";
}
//#endregion
//#region ../react/src/data-sources/use-widget-data.ts
/**
* Resolves cached raw data into widget props by applying each widget's own
* transforms and targetProps mapping.
*/
function resolvePropsFromQueries(queryResults, sources, registry, errorConfig, transformerContext) {
	if (sources.length === 0) return void 0;
	if (queryResults.some((q) => q.isLoading && !q.data)) return void 0;
	const hasError = !!queryResults.find((q) => q.error)?.error;
	if (hasError && errorConfig?.fallback) return errorConfig.fallback;
	if (hasError) return;
	const resolvedProps = {};
	for (let i = 0; i < queryResults.length; i++) {
		const query = queryResults[i];
		const source = sources[i];
		if (!query?.data || !source) continue;
		if (!source.targetProps) continue;
		let result = query.data;
		if (source.transform) {
			const transformer = registry.transformers[source.transform];
			if (transformer) result = transformer(result, source, transformerContext);
			else console.warn(`Transform "${source.transform}" not found in registry`);
		}
		if (result !== null && typeof result === "object" && !Array.isArray(result) && source.targetProps.length > 1) {
			const resultObj = result;
			for (const prop of source.targetProps) if (prop in resultObj) resolvedProps[prop] = resultObj[prop];
		} else for (const prop of source.targetProps) resolvedProps[prop] = result;
	}
	return resolvedProps;
}
/**
* Hook that fetches and resolves data sources for a widget using React Query.
*
* Raw API data is cached and shared across widgets with the same data source.
* Transforms and targetProps mapping are applied per-widget after cache reads,
* so multiple widgets can share one fetch but resolve data independently.
*
* Custom data sources expand to per-item queries so that the same resource
* (e.g. Medium #42) is fetched only once even when referenced by multiple
* widgets on the same page, eliminating N+1 API calls.
*/
function useWidgetData(widget, options) {
	const config = require_registry_context.useDataSourceRegistryConfig();
	const registry = options?.registry ?? config.registry;
	const baseUrl = options?.baseUrl ?? config.baseUrl;
	const getApiHeaders = config.getApiHeaders;
	const variables = config.variables;
	const api = useDataSourceApiOptional() ?? void 0;
	const shellTranslation = require_shell_translation_api_context.useShellTranslationOptional();
	const sources = (0, react.useMemo)(() => (widget.dataSource?.sources ?? []).map(resolveSource), [widget.dataSource?.sources]);
	const errorConfig = widget.dataSource?.error;
	const widgetId = widget.id ?? "unknown";
	const widgetType = widget.type;
	const queryResultsRef = (0, react.useRef)([]);
	const { flatEntries, flatQueries } = (0, react.useMemo)(() => {
		const entries = [];
		return {
			flatEntries: entries,
			flatQueries: sources.flatMap((source, sourceIndex) => {
				if (source.type === "custom" && source.selectedItems?.length) return source.selectedItems.map((item) => {
					entries.push({
						kind: "custom-item",
						sourceIndex
					});
					const languageIso = variables?.language_iso;
					return {
						queryKey: [
							"portal-widget-item",
							item.shareableType,
							item.id,
							baseUrl,
							languageIso
						],
						queryFn: async ({ signal }) => {
							if (!api) throw new Error("DataSourceApiProvider required for custom data sources");
							const resourceType = require_registry_context.SHAREABLE_TO_RESOURCE_TYPE[item.shareableType];
							if (!resourceType) throw new Error(`Unknown shareable type: ${item.shareableType} for item #${item.id}`);
							return api.fetchResource(resourceType, item.id, signal, languageIso);
						},
						enabled: sources.length > 0 && !!api,
						retry: errorConfig?.retryCount ?? 0,
						retryDelay: errorConfig?.retryDelay ?? 1e3,
						refetchInterval: source.refreshInterval ?? false
					};
				});
				entries.push({
					kind: "regular",
					sourceIndex
				});
				return [{
					queryKey: [
						"portal-widget-data",
						getSourceKey(source),
						baseUrl,
						variables ? JSON.stringify(variables) : void 0
					],
					queryFn: async ({ signal }) => {
						const context = {
							widgetId,
							widgetType,
							signal,
							baseUrl,
							getApiHeaders,
							variables,
							api
						};
						const fetcher = registry.fetchers[source.type];
						if (!fetcher) throw new Error(`No fetcher registered for source type: ${source.type}`);
						return fetcher(source, context);
					},
					enabled: sources.length > 0,
					retry: errorConfig?.retryCount ?? 0,
					retryDelay: errorConfig?.retryDelay ?? 1e3,
					refetchInterval: source.refreshInterval ?? false
				}];
			})
		};
	}, [
		sources,
		baseUrl,
		variables,
		widgetId,
		widgetType,
		api,
		registry,
		errorConfig,
		getApiHeaders
	]);
	const rawResults = (0, _tanstack_react_query.useQueries)({ queries: flatQueries });
	queryResultsRef.current = rawResults;
	const results = (0, react.useMemo)(() => {
		const indicesBySource = /* @__PURE__ */ new Map();
		flatEntries.forEach((e, i) => {
			const existing = indicesBySource.get(e.sourceIndex) ?? [];
			existing.push(i);
			indicesBySource.set(e.sourceIndex, existing);
		});
		return sources.map((_, sourceIndex) => {
			const indices = indicesBySource.get(sourceIndex) ?? [];
			if (flatEntries[indices[0] ?? -1]?.kind === "custom-item") {
				const anyLoading = indices.some((i) => rawResults[i]?.isLoading ?? false);
				const items = anyLoading ? void 0 : indices.map((i) => rawResults[i]?.data).filter((d) => d !== void 0);
				let aggError = null;
				if (!anyLoading && items !== void 0) {
					const failures = indices.filter((i) => rawResults[i]?.error);
					if (failures.length > 0) console.error(`[CustomFetcher] ${failures.length}/${indices.length} items failed to fetch`, failures.map((i) => rawResults[i]?.error));
					if (items.length === 0 && indices.length > 0) {
						const firstFailure = rawResults[failures[0] ?? -1]?.error;
						aggError = firstFailure instanceof Error ? firstFailure : firstFailure ? new Error(String(firstFailure)) : /* @__PURE__ */ new Error("All custom data source items failed to fetch");
					}
				}
				return {
					data: items,
					isLoading: anyLoading,
					error: aggError
				};
			}
			const idx = indices[0];
			if (idx === void 0) return {
				data: void 0,
				isLoading: false,
				error: null
			};
			const raw = rawResults[idx];
			if (!raw) return {
				data: void 0,
				isLoading: false,
				error: null
			};
			return {
				data: raw.data,
				isLoading: raw.isLoading,
				error: raw.error instanceof Error ? raw.error : raw.error ? new Error(String(raw.error)) : null
			};
		});
	}, [
		rawResults,
		flatEntries,
		sources
	]);
	const isLoading = rawResults.some((q) => q.isLoading);
	const error = (() => {
		for (let i = 0; i < rawResults.length; i++) {
			const entry = flatEntries[i];
			const result = rawResults[i];
			if (entry?.kind === "regular" && result?.error) return result.error instanceof Error ? result.error : new Error(String(result.error));
		}
		for (const r of results) if (r.error) return r.error;
		return null;
	})();
	const queryFingerprint = rawResults.map((r) => `${r.dataUpdatedAt}:${r.isLoading}`).join(",");
	const resultsRef = (0, react.useRef)(results);
	resultsRef.current = results;
	const transformerContext = (0, react.useMemo)(() => shellTranslation ? { t: (key) => shellTranslation.t(key) } : void 0, [shellTranslation]);
	return {
		data: (0, react.useMemo)(() => {
			return resolvePropsFromQueries(resultsRef.current.map((q) => ({
				data: q.data,
				isLoading: q.isLoading,
				error: q.error
			})), sources, registry, errorConfig, transformerContext);
		}, [
			queryFingerprint,
			sources,
			registry,
			errorConfig,
			transformerContext
		]),
		isLoading,
		error,
		refetch: (0, react.useCallback)(() => {
			queryResultsRef.current.forEach((q) => q.refetch());
		}, [])
	};
}
//#endregion
//#region ../react/src/data-sources/ErrorState.tsx
function ErrorState() {
	return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
		className: "flex min-h-[120px] flex-col items-center justify-center p-6 text-center",
		children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
			className: "text-lg font-semibold",
			children: "Something Went Wrong"
		}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
			className: "text-muted-foreground text-sm",
			children: "Please contact a company admin for help"
		})]
	});
}
//#endregion
//#region ../react/src/data-sources/DataAwareWidget.tsx
const EMPTY_OBJECT = {};
/**
* Wrapper component that resolves data sources before rendering the widget.
* Merges resolved data with static props.
*/
function DataAwareWidgetImpl({ widget, Component, additionalProps, loadingComponent, errorComponent, baseUrl }) {
	const stableAdditionalProps = additionalProps ?? EMPTY_OBJECT;
	const { data, isLoading, error } = useWidgetData(widget, { baseUrl });
	const mergedProps = (0, react.useMemo)(() => ({
		...widget.props,
		...data,
		...stableAdditionalProps
	}), [
		widget.props,
		data,
		stableAdditionalProps
	]);
	if (isLoading && widget.dataSource?.loading?.showSkeleton !== false) {
		if (loadingComponent) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: loadingComponent });
		return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
			className: "bg-muted animate-pulse rounded-md",
			style: { minHeight: 100 },
			children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
				className: "sr-only",
				children: "Loading…"
			})
		});
	}
	if (error && !data) {
		if (errorComponent) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: errorComponent(error) });
		return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorState, {});
	}
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, { ...mergedProps });
}
/**
* Memoized wrapper component that resolves data sources before rendering the widget.
* Prevents re-renders when parent re-renders but props haven't changed.
*/
const DataAwareWidget = (0, react.memo)(DataAwareWidgetImpl);
//#endregion
//#region ../widgets/src/core/ScreenRenderer.tsx
/**
* Internal component that uses the registry from context.
* This allows us to avoid prop drilling the registry.
*/
function ScreenRendererContent({ screen, containerWidgetTypes, className }) {
	const registry = useRegistry();
	const isContainerWidget = (0, react.useCallback)((widgetType) => containerWidgetTypes.includes(widgetType), [containerWidgetTypes]);
	const renderWidget = (0, react.useCallback)((widget, index, currentPath) => {
		const Component = registry[widget.type];
		if (!Component) {
			console.warn(`Widget type "${String(widget.type)}" not found in registry`);
			return null;
		}
		const widgetPath = [...currentPath, index];
		const additionalProps = isContainerWidget(widget.type) ? {
			widgetId: widget.id,
			widgetPath
		} : {};
		const props = {
			...widget.props,
			...additionalProps
		};
		if (widget.dataSource) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
			className: "h-full w-full overflow-x-hidden",
			children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataAwareWidget, {
				widget,
				Component
			})
		}, widget.id || index);
		return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
			className: "h-full w-full overflow-x-hidden",
			children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, { ...props })
		}, widget.id || index);
	}, [registry, isContainerWidget]);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
		className: className || "h-full w-full",
		children: screen?.map((item, index) => {
			if (!item) return null;
			return renderWidget(item, index, []);
		})
	});
}
/**
* ScreenRenderer - View-only component for rendering widget screens.
*
* This is a simplified version designed for the SDK that only handles
* rendering widgets without edit mode or drag-and-drop functionality.
*
* Features:
* - Static rendering of widgets
* - Registry context: No prop drilling for widget registry
* - Container widget support with path tracking
*
* Usage:
* ```tsx
* <ScreenRenderer
*   screen={widgets}
*   registry={WIDGET_REGISTRY}
* />
* ```
*/
function ScreenRenderer(props) {
	const { screen, registry, containerWidgetTypes = [WIDGET_TYPE_NAMES.Layout, WIDGET_TYPE_NAMES.Container], className } = props;
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RegistryProvider, {
		...registry !== void 0 ? { registry } : {},
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScreenRendererContent, {
			screen,
			containerWidgetTypes,
			className
		})
	});
}
//#endregion
Object.defineProperty(exports, "DataAwareWidget", {
	enumerable: true,
	get: function() {
		return DataAwareWidget;
	}
});
Object.defineProperty(exports, "DataSourceApiProvider", {
	enumerable: true,
	get: function() {
		return DataSourceApiProvider;
	}
});
Object.defineProperty(exports, "RegistryProvider", {
	enumerable: true,
	get: function() {
		return RegistryProvider;
	}
});
Object.defineProperty(exports, "ScreenRenderer", {
	enumerable: true,
	get: function() {
		return ScreenRenderer;
	}
});
Object.defineProperty(exports, "WIDGET_TYPE_NAMES", {
	enumerable: true,
	get: function() {
		return WIDGET_TYPE_NAMES;
	}
});
Object.defineProperty(exports, "assertDefined", {
	enumerable: true,
	get: function() {
		return assertDefined;
	}
});
Object.defineProperty(exports, "assertNever", {
	enumerable: true,
	get: function() {
		return assertNever;
	}
});
Object.defineProperty(exports, "isWidgetType", {
	enumerable: true,
	get: function() {
		return isWidgetType;
	}
});
Object.defineProperty(exports, "isWidgetTypeName", {
	enumerable: true,
	get: function() {
		return isWidgetTypeName;
	}
});
Object.defineProperty(exports, "useRegistry", {
	enumerable: true,
	get: function() {
		return useRegistry;
	}
});
Object.defineProperty(exports, "useScreenRenderer", {
	enumerable: true,
	get: function() {
		return useScreenRenderer;
	}
});

//# sourceMappingURL=ScreenRenderer-B-ZfGmhX.cjs.map