"use client";
import { useEffect, useRef } from "react";
//#region src/utils/use-effect-once.ts
var useEffectOnce = (cb) => {
	const savedCallback = useRef(cb);
	const effectGuard = useRef(false);
	useEffect(() => {
		savedCallback.current = cb;
	});
	useEffect(() => {
		if (effectGuard.current !== true) {
			effectGuard.current = true;
			savedCallback.current();
		}
	}, []);
};
//#endregion
export { useEffectOnce };
