import { t as P } from "./vendor/react.js";
import { t as a } from "./utils.js";
import { t as x } from "./use-controllable-state.js";
import { a as h, i as j, n as N, o as y, r as T, s as b, t as C } from "./PopoverDescription.js";
var e = P();
function p({ ...o }) {
  return /* @__PURE__ */ (0, e.jsx)(b, {
    "data-slot": "popover",
    ...o
  });
}
function d({ ...o }) {
  return /* @__PURE__ */ (0, e.jsx)(y, {
    "data-slot": "popover-trigger",
    ...o
  });
}
function l({ className: o, align: t = "center", alignOffset: r = 0, side: i = "bottom", sideOffset: n = 4, ...s }) {
  return /* @__PURE__ */ (0, e.jsx)(h, { children: /* @__PURE__ */ (0, e.jsx)(j, {
    align: t,
    alignOffset: r,
    side: i,
    sideOffset: n,
    className: "isolate z-50",
    children: /* @__PURE__ */ (0, e.jsx)(T, {
      "data-slot": "popover-popup",
      className: a("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none ring-foreground/10 flex flex-col gap-4 rounded-md p-4 text-sm shadow-lg ring-1 duration-150 z-50 w-72 origin-(--transform-origin) outline-hidden", o),
      ...s
    })
  }) });
}
function m({ className: o, ...t }) {
  return /* @__PURE__ */ (0, e.jsx)("div", {
    "data-slot": "popover-header",
    className: a("flex flex-col gap-1 text-sm", o),
    ...t
  });
}
function u({ className: o, ...t }) {
  return /* @__PURE__ */ (0, e.jsx)(N, {
    "data-slot": "popover-title",
    className: a("font-medium delight-stagger motion-reduce:!animate-none", o),
    ...t,
    style: { "--delight-delay": "50ms" }
  });
}
function g({ className: o, ...t }) {
  return /* @__PURE__ */ (0, e.jsx)(C, {
    "data-slot": "popover-description",
    className: a("text-muted-foreground delight-stagger motion-reduce:!animate-none", o),
    ...t,
    style: { "--delight-delay": "100ms" }
  });
}
function v({ trigger: o, open: t, defaultOpen: r = !1, onOpenChange: i, children: n, ...s }) {
  const [c, f] = x({
    value: t,
    defaultValue: r,
    onChange: i
  });
  return /* @__PURE__ */ (0, e.jsxs)(p, {
    open: c,
    onOpenChange: f,
    ...s,
    children: [/* @__PURE__ */ (0, e.jsx)(d, { render: o }), n]
  });
}
v.displayName = "Popover";
p.displayName = "Popover.Root";
d.displayName = "Popover.Trigger";
l.displayName = "Popover.Popup";
m.displayName = "Popover.Header";
u.displayName = "Popover.Title";
g.displayName = "Popover.Description";
var _ = Object.assign(v, {
  Root: p,
  Trigger: d,
  Popup: l,
  Header: m,
  Title: u,
  Description: g
});
export {
  p as a,
  l as i,
  g as n,
  u as o,
  m as r,
  d as s,
  _ as t
};

//# sourceMappingURL=Popover.js.map