import p from "../../../classnames/index.mjs";
import f from "../../../rc-tooltip/es/Popup.mjs";
import "../../../@rc-component/trigger/es/index.mjs";
import * as n from "react";
import "../config-provider/index.mjs";
import { getRenderPropValue as i } from "../_util/getRenderPropValue.mjs";
import u from "./style/index.mjs";
import { ConfigContext as P } from "../config-provider/context.mjs";
var d = globalThis && globalThis.__rest || function(e, a) {
  var t = {};
  for (var r in e)
    Object.prototype.hasOwnProperty.call(e, r) && a.indexOf(r) < 0 && (t[r] = e[r]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var s = 0, r = Object.getOwnPropertySymbols(e); s < r.length; s++)
      a.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[s]) && (t[r[s]] = e[r[s]]);
  return t;
};
const y = (e, a, t) => {
  if (!(!a && !t))
    return /* @__PURE__ */ n.createElement(n.Fragment, null, a && /* @__PURE__ */ n.createElement("div", {
      className: `${e}-title`
    }, i(a)), /* @__PURE__ */ n.createElement("div", {
      className: `${e}-inner-content`
    }, i(t)));
}, g = (e) => {
  const {
    hashId: a,
    prefixCls: t,
    className: r,
    style: s,
    placement: l = "top",
    title: o,
    content: c,
    children: m
  } = e;
  return /* @__PURE__ */ n.createElement("div", {
    className: p(a, t, `${t}-pure`, `${t}-placement-${l}`, r),
    style: s
  }, /* @__PURE__ */ n.createElement("div", {
    className: `${t}-arrow`
  }), /* @__PURE__ */ n.createElement(f, Object.assign({}, e, {
    className: a,
    prefixCls: t
  }), m || y(t, o, c)));
}, x = (e) => {
  const {
    prefixCls: a,
    className: t
  } = e, r = d(e, ["prefixCls", "className"]), {
    getPrefixCls: s
  } = n.useContext(P), l = s("popover", a), [o, c, m] = u(l);
  return o(/* @__PURE__ */ n.createElement(g, Object.assign({}, r, {
    prefixCls: l,
    hashId: c,
    className: p(t, m)
  })));
}, j = x;
export {
  g as RawPurePanel,
  j as default,
  y as getOverlay
};
