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