import { defineComponent as i, openBlock as a, createElementBlock as c, createElementVNode as t, unref as r, withModifiers as s, toDisplayString as k } from "vue";
import { useColor as d } from "./composables-5f691338.js";
import { _export_sfc as w } from "./_plugin-vue_export-helper-6a641814.js";
const x = {
  class: "arrow",
  ref: "handle"
}, u = ["x1", "y1", "x2", "y2", "stroke"], m = ["d", "stroke"], f = ["points", "transform", "fill"], h = { class: "handle" }, y = ["cx", "cy", "stroke", "fill"], $ = ["transform"], v = /* @__PURE__ */ i({
  __name: "SpaceArrow",
  props: {
    link: { type: Object, default: () => ({}) },
    head: { type: Number, default: 6 },
    randomness: { type: Number, default: 0.1 }
  },
  emits: ["user"],
  setup(e, { emit: b }) {
    const n = d("deep");
    return (o, l) => (a(), c("g", x, [
      t("line", {
        x1: e.link.arrow.sx,
        y1: e.link.arrow.sy,
        x2: e.link.arrow.c1x,
        y2: e.link.arrow.c1y,
        stroke: r(n).hex(e.link.user),
        "stroke-width": "1"
      }, null, 8, u),
      t("path", {
        d: `M ${e.link.arrow.sx} ${e.link.arrow.sy} C ${e.link.arrow.c1x} ${e.link.arrow.c1y}, ${e.link.arrow.c2x} ${e.link.arrow.c2y}, ${e.link.arrow.ex} ${e.link.arrow.ey}`,
        stroke: r(n).hex(e.link.user),
        "stroke-width": "2",
        fill: "none",
        "stroke-linecap": "round"
      }, null, 8, m),
      t("polygon", {
        points: `0,${-e.head} ${e.head * 2},0, 0,${e.head}`,
        transform: `translate(${e.link.arrow.ex}, ${e.link.arrow.ey}) rotate(${e.link.arrow.ae})`,
        fill: r(n).hex(e.link.user)
      }, null, 8, f),
      t("g", h, [
        t("circle", {
          class: "cursor-pointer",
          cx: e.link.arrow.c1x,
          cy: e.link.arrow.c1y,
          "stroke-width": "2",
          r: 18,
          stroke: r(n).hex(e.link.user),
          fill: r(n).hex(e.link.mate),
          onClick: l[0] || (l[0] = s((g) => o.$emit("user", e.link.mate), ["prevent", "stop"]))
        }, null, 8, y),
        t("text", {
          class: "text-2xl pointer-events-none",
          transform: `translate(${e.link.arrow.c1x}, ${e.link.arrow.c1y}) rotate(0)`
        }, k(e.link.emoji), 9, $)
      ])
    ], 512));
  }
});
const N = /* @__PURE__ */ w(v, [["__scopeId", "data-v-6b203599"]]);
export {
  N as default
};
//# sourceMappingURL=SpaceArrow-9ba6e93c.js.map
