"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const types = require("../../../../utils/types.js");
const index$1 = require("../../../../hooks/use-namespace/index.js");
const index = require("../../../../hooks/use-z-index/index.js");
const Vue = require("vue");
const usePopperContentDOM = (props, { attributes, styles, role }) => {
  const { nextZIndex } = index.useZIndex();
  const ns = index$1.useNamespace("popper");
  const contentAttrs = Vue.computed(() => Vue.unref(attributes).popper);
  const contentZIndex = Vue.ref(types.isNumber(props.zIndex) ? props.zIndex : nextZIndex());
  const contentClass = Vue.computed(() => [
    ns.b(),
    ns.is("pure", props.pure),
    ns.is(props.effect),
    props.popperClass
  ]);
  const contentStyle = Vue.computed(() => {
    return [
      { zIndex: Vue.unref(contentZIndex) },
      Vue.unref(styles).popper,
      props.popperStyle || {}
    ];
  });
  const ariaModal = Vue.computed(() => role.value === "dialog" ? "false" : void 0);
  const arrowStyle = Vue.computed(() => Vue.unref(styles).arrow || {});
  const updateZIndex = () => {
    contentZIndex.value = types.isNumber(props.zIndex) ? props.zIndex : nextZIndex();
  };
  return {
    ariaModal,
    arrowStyle,
    contentAttrs,
    contentClass,
    contentStyle,
    contentZIndex,
    updateZIndex
  };
};
exports.usePopperContentDOM = usePopperContentDOM;
