import { c } from "react/compiler-runtime";
import React, { createContext, useContext, useState } from "react";
import { jsx } from "react/jsx-runtime";
var ScrollContext = createContext({
	enableScrollTo: !0,
	setScrollTo: () => {}
});
const ScrollProvider = (i) => {
	let a = c(6), { children: o } = i, [s, l] = useState(!0), u;
	a[0] === Symbol.for("react.memo_cache_sentinel") ? (u = (e) => l(e), a[0] = u) : u = a[0];
	let d = u, f;
	a[1] === s ? f = a[2] : (f = {
		enableScrollTo: s,
		setScrollTo: d
	}, a[1] = s, a[2] = f);
	let p;
	return a[3] !== o || a[4] !== f ? (p = /* @__PURE__ */ jsx(ScrollContext.Provider, {
		value: f,
		children: o
	}), a[3] = o, a[4] = f, a[5] = p) : p = a[5], p;
}, useScroll = () => useContext(ScrollContext);
export { ScrollProvider, useScroll };
