import { jsxs as E, jsx as r } from "react/jsx-runtime";
import { forwardRef as h } from "react";
import { noop as j } from "es-toolkit/compat";
import e from "../../utils/classNames.js";
import s, { PLACEMENT_MAP as u } from "../popover/Popover.js";
const x = u.BOTTOM, y = 250, I = h((n, a) => {
  const {
    children: c,
    show: l,
    preRender: i,
    id: m,
    title: t,
    onClick: p = j,
    width: d = y,
    style: f = {},
    className: o,
    placement: T = x,
    ...A
  } = n, C = { ...f, width: d }, N = i && !l ? e(o, "position-offscreen") : o, P = e("ActionBarItemPopover text-color-dark", o), v = e("ActionBarItemPopover", o);
  return /* @__PURE__ */ E(
    s,
    {
      ref: a,
      id: m,
      onClick: p,
      placement: T,
      ...A,
      style: C,
      className: N,
      children: [
        t && /* @__PURE__ */ r(s.Title, { className: P, children: t }),
        /* @__PURE__ */ r(s.Content, { className: v, children: c })
      ]
    }
  );
});
export {
  I as default
};
//# sourceMappingURL=ActionBarOverlay.js.map
