import { useUser as m, useColor as x, useMate as b, unref as e, openBlock as s, createElementBlock as l, createBaseVNode as k, createVNode as f, toDisplayString as g, createCommentVNode as u, withDirectives as y, vModelText as v, isRef as h, withModifiers as w, normalizeStyle as M } from "./composables-Ci32s3jE.js";
import { AccountBadge as B } from "./components.js";
const C = {
  key: 0,
  class: "flex items-center"
}, V = {
  key: 0,
  class: "p-2"
}, _ = {
  key: 2,
  class: "i-la-plus"
}, D = {
  key: 3,
  class: "i-la-times"
}, j = {
  __name: "MateButton",
  props: {
    pub: { type: String, default: "" }
  },
  setup(n) {
    const d = n, { user: r } = m(), p = x("deep"), { emoji: i, isMate: o, toggleMate: c } = b(d.pub);
    return (N, t) => e(r).is && e(r).pub != n.pub ? (s(), l("div", C, [
      k("button", {
        class: "flex items-center rounded-2xl shadow-xl px-2 text-3xl bg-light-500 dark-bg-dark-700",
        style: M({ backgroundColor: e(o) ? e(p).hex(n.pub) : "" }),
        onClick: t[2] || (t[2] = (a) => e(c)())
      }, [
        f(e(B), {
          pub: e(r).pub,
          "show-name": !1
        }, null, 8, ["pub"]),
        e(o) ? (s(), l("div", V, g(e(o)), 1)) : u("", !0),
        e(o) ? u("", !0) : y((s(), l("input", {
          key: 1,
          class: "mx-1 rounded-2xl w-46px p-2 rounded-lg shadow-inner text-center",
          "onUpdate:modelValue": t[0] || (t[0] = (a) => h(i) ? i.value = a : null),
          type: "text",
          placeholder: "",
          onClick: t[1] || (t[1] = w(() => {
          }, ["stop", "prevent"]))
        }, null, 512)), [
          [v, e(i)]
        ]),
        e(o) ? (s(), l("div", D)) : (s(), l("div", _))
      ], 4)
    ])) : u("", !0);
  }
};
export {
  j as default
};
//# sourceMappingURL=MateButton-DlqRtasW.js.map
