"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const Vue = require("vue");
const d = (a, s) => {
  const o = Vue.ref(false), t = Vue.ref();
  return {
    focusStartRef: t,
    trapped: o,
    onFocusAfterReleased: (e) => {
      var n;
      ((n = e.detail) == null ? void 0 : n.focusReason) !== "pointer" && (t.value = "first", s("blur"));
    },
    onFocusAfterTrapped: () => {
      s("focus");
    },
    onFocusInTrap: (e) => {
      a.visible && !o.value && (e.target && (t.value = e.target), o.value = true);
    },
    onFocusoutPrevented: (e) => {
      a.trapping || (e.detail.focusReason === "pointer" && e.preventDefault(), o.value = false);
    },
    onReleaseRequested: () => {
      o.value = false, s("close");
    }
  };
};
exports.usePopperContentFocusTrap = d;
