import { jsx as m } from "react/jsx-runtime";
import { createContext as g, useContext as R, useState as e } from "react";
const l = g({
  getVirtualScrollRef: () => {
  },
  getPageScrollElementRef: () => {
  },
  getVirtualScrollableElementRef: () => {
  },
  scrollPosition: {
    scrollTop: 0,
    scrollLeft: 0
  },
  setScrollPosition: () => {
  },
  totalInnerDimensions: {
    height: 0,
    width: 0
  },
  setTotalInnerDimensions: () => {
  }
}), E = () => R(l), h = ({ children: t }) => {
  const [o, r] = e(), [n, s] = e(), [i, c] = e(), [a, S] = e({
    scrollTop: 0,
    scrollLeft: 0
  }), [u, f] = e({
    height: 0,
    width: 0
  });
  return /* @__PURE__ */ m(
    l.Provider,
    {
      value: {
        virtualScrollRef: o,
        getVirtualScrollRef: r,
        pageScrollElementRef: i,
        getPageScrollElementRef: c,
        virtualScrollableElementRef: n,
        getVirtualScrollableElementRef: s,
        scrollPosition: a,
        setScrollPosition: S,
        totalInnerDimensions: u,
        setTotalInnerDimensions: f
      },
      children: t
    }
  );
};
export {
  l as VirtualScrollContext,
  h as VirtualScrollProvider,
  E as useVirtualScrollContext
};
