"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const Vue = require("vue");
const index = require("../use-namespace/index.js");
const index$1 = require("../use-id/index.js");
const index$2 = require("../../../../@vueuse/shared/index.js");
let r;
const a = () => {
  const t = index.useGetDerivedNamespace(), e = index$1.useIdInjection(), o = Vue.computed(() => `${t.value}-popper-container-${e.prefix}`), c = Vue.computed(() => `#${o.value}`);
  return {
    id: o,
    selector: c
  };
}, d = (t) => {
  const e = document.createElement("div");
  return e.id = t, document.body.appendChild(e), e;
}, C = () => {
  const { id: t, selector: e } = a();
  return Vue.onBeforeMount(() => {
    index$2.isClient && (!r && !document.body.querySelector(e.value)) && (r = d(t.value));
  }), {
    id: t,
    selector: e
  };
};
exports.usePopperContainer = C;
exports.usePopperContainerId = a;
