"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index$1 = require("../../../../../@vueuse/core/index.js");
const index = require("../../../../../@vueuse/shared/index.js");
const u = (e, t = []) => {
  const { placement: n, strategy: o, popperOptions: i } = e, r = {
    placement: n,
    strategy: o,
    ...i,
    modifiers: [...p(e), ...t]
  };
  return l(r, i == null ? void 0 : i.modifiers), r;
}, c = (e) => {
  if (index.isClient)
    return index$1.unrefElement(e);
};
function p(e) {
  const { offset: t, gpuAcceleration: n, fallbackPlacements: o } = e;
  return [
    {
      name: "offset",
      options: {
        offset: [0, t ?? 12]
      }
    },
    {
      name: "preventOverflow",
      options: {
        padding: {
          top: 2,
          bottom: 2,
          left: 5,
          right: 5
        }
      }
    },
    {
      name: "flip",
      options: {
        padding: 5,
        fallbackPlacements: o
      }
    },
    {
      name: "computeStyles",
      options: {
        gpuAcceleration: n
      }
    }
  ];
}
function l(e, t) {
  t && (e.modifiers = [...e.modifiers, ...t ?? []]);
}
exports.buildPopperOptions = u;
exports.unwrapMeasurableEl = c;
