import { n as r, B as u, o as x, F as b, p as g, q as j, r as v } from "./main-mGfIFfsW.js";
import { j as a } from "./jsx-runtime-C5mzlN2N.js";
import { A as C } from "./Animated-B_xTpw9g.js";
import { C as s } from "./css-BUXMI9PB.js";
const S = ({
  onClick: n,
  className: i,
  hideCaret: e = !1,
  children: l,
  variant: o,
  ...m
}) => {
  const { toggle: p, visible: c, variant: f } = r();
  let t;
  return o === "preview" && (e = !0), f !== "modal" && !e && (t = /* @__PURE__ */ a.jsx(C, { enabled: c, enabledLoc: "bottom", disabledLoc: "left" })), /* @__PURE__ */ a.jsxs(
    u,
    {
      className: s(s.BE("dialog", "trigger"), i),
      onClick: (d) => {
        n?.(d), p();
      },
      full: "x",
      variant: o,
      ...m,
      children: [
        l,
        t
      ]
    }
  );
}, T = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Dialog: x,
  Frame: b,
  Trigger: S,
  parseLocationOptions: g,
  position: j,
  useContext: r,
  useInternalContext: v
}, Symbol.toStringTag, { value: "Module" }));
export {
  S as T,
  T as e
};
