/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
const require_styles_styler = require('../styles/styler.cjs');
const require_components_Box = require('./Box.cjs');
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");

//#region src/components/SvgFloatingOverlay.tsx
const SvgFloatingOverlay = ({ blurClassName, blurStyle, childTransitionStyle, svgPath, dimensions, shadows, svgClassNames, shadowFilterId, shadowPadding, arrowHeight, contentWrapperSlotProps, children, borderRadius, svgBaseStyle, svgBorderStyle }) => {
	const svgSharedProps = {
		"aria-hidden": true,
		style: childTransitionStyle,
		viewBox: `0 0 ${dimensions.width} ${dimensions.height}`
	};
	return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
		/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
			className: blurClassName,
			style: {
				...blurStyle,
				...childTransitionStyle
			}
		}),
		svgPath && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
			...svgSharedProps,
			className: require_styles_styler.cx("absolute top-0 left-0 w-full h-full overflow-visible pointer-events-none", "z-[2]"),
			children: [
				shadows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("filter", {
					id: shadowFilterId,
					filterUnits: "userSpaceOnUse",
					x: -(shadowPadding + arrowHeight),
					y: -(shadowPadding + arrowHeight),
					width: dimensions.width + 2 * (shadowPadding + arrowHeight),
					height: dimensions.height + 2 * (shadowPadding + arrowHeight),
					colorInterpolationFilters: "sRGB",
					children: [
						shadows.map((shadow, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [
							shadow.spread !== 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("feMorphology", {
								in: "SourceAlpha",
								operator: shadow.spread > 0 ? "dilate" : "erode",
								radius: Math.abs(shadow.spread),
								result: `spread${i}`
							}),
							/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feGaussianBlur", {
								in: shadow.spread !== 0 ? `spread${i}` : "SourceAlpha",
								stdDeviation: shadow.blur / 2,
								result: `blurred${i}`
							}),
							/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feOffset", {
								in: `blurred${i}`,
								dx: shadow.x,
								dy: shadow.y,
								result: `offset${i}`
							}),
							/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feFlood", {
								floodColor: shadow.color,
								result: `color${i}`
							}),
							/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feComposite", {
								in: `color${i}`,
								in2: `offset${i}`,
								operator: "in",
								result: `shadow${i}`
							})
						] }, i)),
						/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feMerge", {
							result: "mergedShadows",
							children: shadows.map((_, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("feMergeNode", { in: `shadow${i}` }, i))
						}),
						/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feComposite", {
							in: "mergedShadows",
							in2: "SourceAlpha",
							operator: "out"
						})
					]
				}) }),
				shadows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
					d: svgPath,
					fill: "black",
					filter: `url(#${shadowFilterId})`
				}),
				/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
					d: svgPath,
					className: svgClassNames.base,
					style: svgBaseStyle
				})
			]
		}),
		/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
			position: "relative",
			flexGrow: "1",
			overflow: "hidden",
			...contentWrapperSlotProps,
			className: require_styles_styler.cx("z-[3]", "max-h-full", "gap-[inherit]", contentWrapperSlotProps?.className),
			style: {
				...childTransitionStyle,
				borderRadius
			},
			children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
				overflow: "auto",
				flexGrow: "1",
				display: "block",
				className: "max-h-full gap-[inherit]",
				children
			})
		}),
		svgPath && svgClassNames.border && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
			...svgSharedProps,
			className: require_styles_styler.cx("absolute top-0 left-0 w-full h-full overflow-visible pointer-events-none", "z-[3]"),
			children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
				d: svgPath,
				className: svgClassNames.border,
				fill: "transparent",
				style: svgBorderStyle
			})
		})
	] });
};
SvgFloatingOverlay.displayName = "SvgFloatingOverlay";

//#endregion
exports.SvgFloatingOverlay = SvgFloatingOverlay;