import { forwardRef as e } from "react";
import { jsx as t } from "react/jsx-runtime";
//#region src/floating-arrow/getArrowStyle.ts
function n(e, t) {
	if (!t?.arrow) return {};
	let { x: n, y: r } = t.arrow, i = e.split("-")[0], a = {
		top: "bottom",
		right: "left",
		bottom: "top",
		left: "right"
	}[i], o = {
		top: "rotate(180deg)",
		right: "rotate(-90deg)",
		bottom: "rotate(0deg)",
		left: "rotate(90deg)"
	}[i];
	return {
		pointerEvents: "none",
		position: "absolute",
		zIndex: -5,
		width: "16px",
		height: "16px",
		left: n == null ? "" : `${n}px`,
		top: r == null ? "" : `${r}px`,
		transform: o,
		[a]: "-16px"
	};
}
//#endregion
//#region src/floating-arrow/FloatingArrow.tsx
var r = e(({ placement: e, middlewareData: r }, i) => /* @__PURE__ */ t("div", {
	ref: i,
	style: n(e, r),
	children: /* @__PURE__ */ t("svg", {
		width: "16",
		height: "16",
		viewBox: "0 0 16 16",
		fill: "var(--border-2)",
		stroke: "var(--border-2)",
		strokeWidth: "var(--border-width)",
		style: { display: "block" },
		children: /* @__PURE__ */ t("polygon", { points: "8,8 16,16 0,16" })
	})
}));
//#endregion
export { r as t };

//# sourceMappingURL=floating-arrow-DPKwJfww.js.map