"use client";
import { jsx as o, jsxs as p } from "react/jsx-runtime";
import { u as h } from "./portal-provider-hwmkdmkpvct0cb76.js";
import { c as i } from "./vendor-styling-ofvnbcuht98q88oo.js";
import { bo as C, bp as x, bq as N, br as y, bs as L, bt as k, bu as T, bv as w, bw as R } from "./vendor-base-ui-elpbzr8xeffrz4h2.js";
const $ = {
  side: {
    top: {
      classes: "",
      description: "Popover appears above the trigger"
    },
    bottom: {
      classes: "",
      description: "Popover appears below the trigger"
    },
    left: {
      classes: "",
      description: "Popover appears to the left of the trigger"
    },
    right: {
      classes: "",
      description: "Popover appears to the right of the trigger"
    }
  }
}, V = {
  side: "bottom"
};
function d({ children: e, ...t }) {
  return /* @__PURE__ */ o(C, { ...t, children: e });
}
d.displayName = "Popover";
function l({
  children: e,
  className: t,
  asChild: r,
  render: a,
  ...s
}) {
  return /* @__PURE__ */ o(
    x,
    {
      "data-kumo-component": "Popover",
      "data-kumo-part": "trigger",
      className: t,
      render: a ?? (r ? e : void 0),
      ...s,
      children: r ? void 0 : e
    }
  );
}
l.displayName = "Popover.Trigger";
function c({
  children: e,
  side: t = V.side,
  align: r = "center",
  sideOffset: a = 8,
  alignOffset: s = 0,
  positionMethod: n = "absolute",
  anchor: g,
  className: P,
  container: f
}) {
  const b = h();
  return /* @__PURE__ */ o(N, { container: f ?? b ?? void 0, children: /* @__PURE__ */ o(
    y,
    {
      anchor: g,
      align: r,
      alignOffset: s,
      side: t,
      sideOffset: a,
      positionMethod: n,
      children: /* @__PURE__ */ p(
        L,
        {
          className: i(
            "flex origin-(--transform-origin) flex-col rounded-lg bg-kumo-base px-4 py-3 text-sm text-kumo-default",
            "shadow-lg shadow-kumo-tip-shadow outline outline-kumo-fill",
            "transition-[transform,scale,opacity] duration-150",
            "data-starting-style:scale-90 data-starting-style:opacity-0",
            "data-ending-style:scale-90 data-ending-style:opacity-0",
            "data-instant:duration-0",
            "kumo-popover-popup",
            P
          ),
          children: [
            /* @__PURE__ */ o(
              k,
              {
                className: i(
                  "flex",
                  "data-[side=bottom]:-top-2",
                  "data-[side=left]:right-[-13px] data-[side=left]:rotate-90",
                  "data-[side=right]:left-[-13px] data-[side=right]:-rotate-90",
                  "data-[side=top]:-bottom-2 data-[side=top]:rotate-180"
                ),
                children: /* @__PURE__ */ o(A, {})
              }
            ),
            e
          ]
        }
      )
    }
  ) });
}
c.displayName = "Popover.Content";
function m({ className: e, ...t }) {
  return /* @__PURE__ */ o(
    T,
    {
      className: i("m-0 text-base leading-6 font-medium", e),
      ...t
    }
  );
}
m.displayName = "Popover.Title";
function v({ className: e, ...t }) {
  return /* @__PURE__ */ o(
    w,
    {
      className: i("m-0 text-base leading-6 text-kumo-subtle", e),
      ...t
    }
  );
}
v.displayName = "Popover.Description";
function u({
  children: e,
  className: t,
  asChild: r,
  render: a,
  ...s
}) {
  return /* @__PURE__ */ o(R, { className: t, render: a ?? (r ? e : void 0), ...s, children: r ? void 0 : e });
}
u.displayName = "Popover.Close";
function A(e) {
  return /* @__PURE__ */ p("svg", { width: "20", height: "10", viewBox: "0 0 20 10", fill: "none", ...e, children: [
    /* @__PURE__ */ o(
      "path",
      {
        d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
        className: "fill-kumo-base"
      }
    ),
    /* @__PURE__ */ o(
      "path",
      {
        d: "M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z",
        className: "fill-kumo-tip-shadow"
      }
    ),
    /* @__PURE__ */ o(
      "path",
      {
        d: "M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z",
        className: "fill-kumo-tip-stroke"
      }
    )
  ] });
}
const j = Object.assign(d, {
  Trigger: l,
  Content: c,
  Title: m,
  Description: v,
  Close: u
});
export {
  $ as K,
  j as P,
  d as a,
  l as b,
  c,
  m as d,
  v as e,
  u as f,
  V as g
};
//# sourceMappingURL=popover-cqdmpp8i4hg8gzzx.js.map
