"use client";
import { useRenderStrategyPropsContext } from "../../utils/render-strategy.js";
import { composeRefs } from "../../utils/compose-refs.js";
import { ark } from "../factory.js";
import { usePresence } from "../presence/use-presence.js";
import { useTourContext } from "./use-tour-context.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/tour/tour-spotlight.tsx
var TourSpotlight = forwardRef((props, ref) => {
	const tour = useTourContext();
	const presence = usePresence({
		...useRenderStrategyPropsContext(),
		present: tour.open
	});
	const mergedProps = mergeProps(tour.getSpotlightProps(), presence.getPresenceProps(), props);
	const hidden = !tour.open || !tour.step?.target?.();
	if (presence.unmounted) return null;
	return /* @__PURE__ */ jsx(ark.div, {
		...mergedProps,
		ref: composeRefs(presence.ref, ref),
		hidden
	});
});
TourSpotlight.displayName = "TourSpotlight";
//#endregion
export { TourSpotlight };
