var f = Object.defineProperty;
var n = (e, r) => f(e, "name", { value: r, configurable: !0 });
import { hoverTooltip as c } from "../../../../../../@codemirror_view@6.36.4/node_modules/@codemirror/view/dist/index.js";
import { defaultRenderer as i } from "./renderTooltip.js";
import { tsFacetWorker as p } from "../facet/tsFacetWorker.js";
function d({ renderTooltip: e = i } = {}) {
  return c(async (r, a) => {
    const o = r.state.facet(p);
    if (!o?.worker)
      return null;
    const t = await o.worker.getHover({
      path: o.path,
      pos: a
    });
    return t ? {
      pos: t.start,
      end: t.end,
      create: /* @__PURE__ */ n(() => e(t, r), "create")
    } : null;
  });
}
n(d, "tsHoverWorker");
export {
  d as tsHoverWorker
};
