"use client";
import { ark } from "../factory.js";
import { useToggleContext } from "./use-toggle-context.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/toggle/toggle-indicator.tsx
var ToggleIndicator = forwardRef((props, ref) => {
	const { children, fallback, ...restProps } = props;
	const toggle = useToggleContext();
	const mergedProps = mergeProps(toggle.getIndicatorProps(), restProps);
	return /* @__PURE__ */ jsx(ark.div, {
		...mergedProps,
		ref,
		children: toggle.pressed ? children : fallback
	});
});
ToggleIndicator.displayName = "ToggleIndicator";
//#endregion
export { ToggleIndicator };
