"use client";
import { jsx as t } from "react/jsx-runtime";
import { createContext as u, useState as c, useEffect as T, useContext as l } from "react";
import { Popover as p, PopoverTrigger as h, PopoverContent as m } from "./popover.js";
import { TooltipProvider as a, Tooltip as v, TooltipTrigger as d, TooltipContent as f } from "./tooltip.js";
const s = u(void 0), n = () => l(s), M = ({
  children: o,
  ...e
}) => {
  const [i, r] = c(void 0);
  return T(() => {
    r(window.matchMedia("(pointer: coarse)").matches);
  }, []), /* @__PURE__ */ t(s.Provider, { value: i, children: /* @__PURE__ */ t(a, { ...e, children: o }) });
}, b = (o) => {
  const e = n(), [i, r] = c(!1);
  return e ? /* @__PURE__ */ t(p, { ...o, onOpenChange: r, open: i }) : /* @__PURE__ */ t(v, { ...o });
}, w = (o) => n() ? /* @__PURE__ */ t(h, { ...o }) : /* @__PURE__ */ t(d, { ...o }), O = (o) => n() ? /* @__PURE__ */ t(m, { ...o }) : /* @__PURE__ */ t(f, { ...o });
export {
  b as MobileTooltip,
  O as MobileTooltipContent,
  M as MobileTooltipProvider,
  w as MobileTooltipTrigger
};
