import { g as P, m as S, br as _, d, r as w, bs as B, bt as k, b as T, bf as N, u as z, c as A, y as D, _ as h, a3 as I, o as W, i as E, bu as H, b0 as C, bv as j, f as $ } from "./index2.js"; import { defineComponent as M, ref as R, computed as L, createVNode as b, Fragment as O } from "vue"; const F = (e) => { const { componentCls: o, popoverBg: r, popoverColor: t, width: a, fontWeightStrong: s, popoverPadding: l, boxShadowSecondary: c, colorTextHeading: u, borderRadiusLG: g, zIndexPopup: p, marginXS: v, colorBgElevated: n } = e; return [ { [o]: d(d({}, w(e)), { position: "absolute", top: 0, // use `left` to fix https://github.com/ant-design/ant-design/issues/39195 left: { _skip_check_: !0, value: 0 }, zIndex: p, fontWeight: "normal", whiteSpace: "normal", textAlign: "start", cursor: "auto", userSelect: "text", "--antd-arrow-background-color": n, "&-rtl": { direction: "rtl" }, "&-hidden": { display: "none" }, [`${o}-content`]: { position: "relative" }, [`${o}-inner`]: { backgroundColor: r, backgroundClip: "padding-box", borderRadius: g, boxShadow: c, padding: l }, [`${o}-title`]: { minWidth: a, marginBottom: v, color: u, fontWeight: s }, [`${o}-inner-content`]: { color: t } }) }, // Arrow Style B(e, { colorBg: "var(--antd-arrow-background-color)" }), // Pure Render { [`${o}-pure`]: { position: "relative", maxWidth: "none", [`${o}-content`]: { display: "inline-block" } } } ]; }, G = (e) => { const { componentCls: o } = e; return { [o]: k.map((r) => { const t = e[`${r}-6`]; return { [`&${o}-${r}`]: { "--antd-arrow-background-color": t, [`${o}-inner`]: { backgroundColor: t }, [`${o}-arrow`]: { background: "transparent" } } }; }) }; }, V = (e) => { const { componentCls: o, lineWidth: r, lineType: t, colorSplit: a, paddingSM: s, controlHeight: l, fontSize: c, lineHeight: u, padding: g } = e, p = l - Math.round(c * u), v = p / 2, n = p / 2 - r, i = g; return { [o]: { [`${o}-inner`]: { padding: 0 }, [`${o}-title`]: { margin: 0, padding: `${v}px ${i}px ${n}px`, borderBottom: `${r}px ${t} ${a}` }, [`${o}-inner-content`]: { padding: `${s}px ${i}px` } } }; }, X = P("Popover", (e) => { const { colorBgElevated: o, colorText: r, wireframe: t } = e, a = S(e, { popoverBg: o, popoverColor: r, popoverPadding: 12 // Fixed Value }); return [F(a), G(a), t && V(a), _(a, "zoom-big")]; }, (e) => { let { zIndexPopupBase: o } = e; return { zIndexPopup: o + 30, width: 177 }; }), Z = () => d(d({}, j()), { content: $(), title: $() }), q = M({ compatConfig: { MODE: 3 }, name: "APopover", inheritAttrs: !1, props: E(Z(), d(d({}, H()), { trigger: "hover", placement: "top", mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1 })), setup(e, o) { let { expose: r, slots: t, attrs: a } = o; const s = R(); N(e.visible === void 0, "popover", "`visible` will be removed in next major version, please use `open` instead."), r({ getPopupDomNode: () => { var n, i; return (i = (n = s.value) === null || n === void 0 ? void 0 : n.getPopupDomNode) === null || i === void 0 ? void 0 : i.call(n); } }); const { prefixCls: l, configProvider: c } = z("popover", e), [u, g] = X(l), p = L(() => c.getPrefixCls()), v = () => { var n, i; const { title: m = C((n = t.title) === null || n === void 0 ? void 0 : n.call(t)), content: f = C((i = t.content) === null || i === void 0 ? void 0 : i.call(t)) } = e, x = !!(Array.isArray(m) ? m.length : m), y = !!(Array.isArray(f) ? f.length : m); return !x && !y ? null : b(O, null, [x && b("div", { class: `${l.value}-title` }, [m]), b("div", { class: `${l.value}-inner-content` }, [f])]); }; return () => { const n = A(e.overlayClassName, g.value); return u(b(D, h(h(h({}, W(e, ["title", "content"])), a), {}, { prefixCls: l.value, ref: s, overlayClassName: n, transitionName: I(p.value, "zoom-big", e.transitionName), "data-popover-inject": !0 }), { title: v, default: t.default })); }; } }), U = T(q); export { U as _ };