import { computed, onBeforeMount } from "vue";
import { useGetDerivedNamespace as C$1 } from "../use-namespace/index.mjs";
import { useIdInjection as a$1 } from "../use-id/index.mjs";
import { isClient as f } from "../../../../@vueuse/shared/index.mjs";
let r;
const a = () => {
  const t = C$1(), e = a$1(), o = computed(() => `${t.value}-popper-container-${e.prefix}`), c = 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 onBeforeMount(() => {
    f && (!r && !document.body.querySelector(e.value)) && (r = d(t.value));
  }), {
    id: t,
    selector: e
  };
};
export {
  C as usePopperContainer,
  a as usePopperContainerId
};
