import { jsx as s } from "react/jsx-runtime";
import { createContext as i, useContext as S } from "react";
import { useFullScreen as F } from "../utils/hooks/useFullScreen.js";
const t = i(void 0), p = ({ elementRef: e, children: o }) => {
  const { isFullScreen: r, enterFullScreen: n, exitFullScreen: l, isSupported: u } = F(), c = () => {
    r ? l() : e && n(e);
  };
  return /* @__PURE__ */ s(t.Provider, { value: { isFullScreen: r, toggleFullScreen: c, isSupported: u }, children: o });
}, f = () => {
  const e = S(t);
  if (!e)
    throw new Error("useFullScreenContext must be used within a FullScreenProvider");
  return e;
};
export {
  p as FullScreenProvider,
  f as useFullScreenContext
};
