import { computed, unref, ref } from "vue";
import { useZIndex as f } from "../../../../hooks/use-z-index/index.mjs";
import { useNamespace as q } from "../../../../hooks/use-namespace/index.mjs";
import { isNumber as i } from "../../../../utils/types.mjs";
const w = (e, {
  attributes: s,
  styles: c,
  role: p
}) => {
  const { nextZIndex: d } = f(), o = q("popper"), u = computed(() => unref(s).popper), r = ref(i(e.zIndex) ? e.zIndex : d()), x = computed(() => [
    o.b(),
    o.is("pure", e.pure),
    o.is(e.effect),
    e.popperClass
  ]), m = computed(() => [
    { zIndex: unref(r) },
    unref(c).popper,
    e.popperStyle || {}
  ]), i$1 = computed(() => p.value === "dialog" ? "false" : void 0), I = computed(() => unref(c).arrow || {});
  return {
    ariaModal: i$1,
    arrowStyle: I,
    contentAttrs: u,
    contentClass: x,
    contentStyle: m,
    contentZIndex: r,
    updateZIndex: () => {
      r.value = i(e.zIndex) ? e.zIndex : d();
    }
  };
};
export {
  w as usePopperContentDOM
};
