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