import { n as ErrorBoundary_default, t as __rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper.js";
import { t as useIsServerSide } from "./useIsServerSide.js";
import { n as getIllustration } from "./utils4.js";
import { t as Illustration_default } from "./Illustration.js";
import { n as IllustrationSizeList } from "./IllustrationNames.js";
import { Suspense, lazy, useMemo } from "react";
import { jsx } from "react/jsx-runtime";
const LazyIllustration = ({ illustrationName, size = 512, ...rest }) => {
	const lazyLoadIllustration = (illustrationName$1, size$1) => {
		const sizes = IllustrationSizeList[illustrationName$1];
		const illustrationFileName = getIllustration({
			size: size$1,
			...sizes
		});
		return lazy(() => __rolldown_dynamic_import_helper_default({
			"../Illustrations/BabyMobile.tsx": () => import("./components/Illustrations/BabyMobile.js"),
			"../Illustrations/BabyMobileMedium.tsx": () => import("./components/Illustrations/BabyMobileMedium.js"),
			"../Illustrations/Child.tsx": () => import("./components/Illustrations/Child.js"),
			"../Illustrations/ChildMedium.tsx": () => import("./components/Illustrations/ChildMedium.js"),
			"../Illustrations/Doctor.tsx": () => import("./components/Illustrations/Doctor.js"),
			"../Illustrations/DoctorMedium.tsx": () => import("./components/Illustrations/DoctorMedium.js"),
			"../Illustrations/DoctorSmall.tsx": () => import("./components/Illustrations/DoctorSmall.js"),
			"../Illustrations/FacialRecognitionFingerprint.tsx": () => import("./components/Illustrations/FacialRecognitionFingerprint.js"),
			"../Illustrations/FacialRecognitionFingerprintMedium.tsx": () => import("./components/Illustrations/FacialRecognitionFingerprintMedium.js"),
			"../Illustrations/GiveBabyFood.tsx": () => import("./components/Illustrations/GiveBabyFood.js"),
			"../Illustrations/GiveBabyFoodMedium.tsx": () => import("./components/Illustrations/GiveBabyFoodMedium.js"),
			"../Illustrations/HealthcarePersonnel.tsx": () => import("./components/Illustrations/HealthcarePersonnel.js"),
			"../Illustrations/HealthcarePersonnelMedium.tsx": () => import("./components/Illustrations/HealthcarePersonnelMedium.js"),
			"../Illustrations/HealthcarePersonnelSmall.tsx": () => import("./components/Illustrations/HealthcarePersonnelSmall.js"),
			"../Illustrations/ReadLetters.tsx": () => import("./components/Illustrations/ReadLetters.js"),
			"../Illustrations/ReadLettersMedium.tsx": () => import("./components/Illustrations/ReadLettersMedium.js"),
			"../Illustrations/Stork.tsx": () => import("./components/Illustrations/Stork.js"),
			"../Illustrations/StorkMedium.tsx": () => import("./components/Illustrations/StorkMedium.js"),
			"../Illustrations/Stroller.tsx": () => import("./components/Illustrations/Stroller.js"),
			"../Illustrations/StrollerMedium.tsx": () => import("./components/Illustrations/StrollerMedium.js"),
			"../Illustrations/Support2.tsx": () => import("./components/Illustrations/Support2.js"),
			"../Illustrations/Support2Medium.tsx": () => import("./components/Illustrations/Support2Medium.js"),
			"../Illustrations/Thinking.tsx": () => import("./components/Illustrations/Thinking.js"),
			"../Illustrations/ThinkingMedium.tsx": () => import("./components/Illustrations/ThinkingMedium.js")
		}, `../Illustrations/${illustrationFileName}.tsx`, 3));
	};
	const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);
	if (useIsServerSide()) return null;
	const fallback = /* @__PURE__ */ jsx("svg", {
		"data-testid": "fallback",
		role: "presentation",
		focusable: false,
		"aria-hidden": true,
		viewBox: "0 0 512 512",
		style: {
			minWidth: size,
			minHeight: size
		},
		width: size,
		height: size
	});
	return /* @__PURE__ */ jsx(ErrorBoundary_default, {
		fallback,
		reset: illustrationName,
		children: /* @__PURE__ */ jsx(Suspense, {
			fallback,
			children: /* @__PURE__ */ jsx(Illustration_default, {
				illustration,
				size,
				...rest
			})
		})
	});
};
var LazyIllustration_default$1 = LazyIllustration;
export { LazyIllustration as n, LazyIllustration_default$1 as t };

//# sourceMappingURL=LazyIllustration.js.map