import { D as d } from "./Dialog-BspO7uo8.js";
import { u as s, F as b, p as x, a as g, b as j } from "./Animated-C4xrEVd-.js";
import { j as a } from "./jsx-runtime-BbD0H88J.js";
import { B as v } from "./Button-DLtxKGH5.js";
import { A as C } from "./Animated-BbeJdao0.js";
import { C as r } from "./css-BkBrZtKZ.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
      ]
    }
  );
}, A = /* @__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,
  A as e
};
