import { createElementBlock as l, createCommentVNode as o, unref as a, openBlock as n, normalizeStyle as p, withModifiers as r, createElementVNode as u, toDisplayString as y } from "vue";
import { useColor as c, useUser as k } from "./composables-BAZQlC3e.js";
const v = {
  key: 1,
  class: "flex items-center"
}, f = ["modelValue"], g = { class: "px-2 py-1 text-xl w-36px" }, B = {
  __name: "PostReactionButton",
  props: {
    isMy: { type: [Boolean, String], default: "" },
    reaction: { type: [Boolean, String], default: "" }
  },
  emits: ["react", "user"],
  setup(t, { emit: m }) {
    const s = m, x = c("deep"), { user: d } = k();
    return (b, e) => a(d).pub ? (n(), l("button", {
      key: 0,
      class: "rounded-2xl text-lg bg-light-200 dark-bg-dark-700 flex items-center pl-1 pr-1 mr-1",
      style: p({ backgroundColor: t.isMy ? a(x).hex(a(d).pub) : "" })
    }, [
      t.isMy ? o("", !0) : (n(), l("div", {
        key: 0,
        class: "flex items-center px-2 py-1 text-xl",
        onClick: e[0] || (e[0] = r((i) => s("react", "👍"), ["stop", "prevent"]))
      }, e[5] || (e[5] = [
        u("div", { class: "i-la-plus" }, null, -1)
      ]))),
      t.isMy ? (n(), l("div", {
        key: 2,
        class: "flex items-center",
        onClick: e[3] || (e[3] = r((i) => s("react", t.reaction), ["stop", "prevent"]))
      }, [
        u("div", g, y(t.reaction), 1),
        e[6] || (e[6] = u("div", { class: "i-la-times" }, null, -1))
      ])) : (n(), l("div", v, [
        t.isMy ? o("", !0) : (n(), l("input", {
          key: 0,
          class: "py-1 px-2 w-36px rounded-xl mx-1 text-center",
          modelValue: t.reaction,
          onInput: e[1] || (e[1] = (i) => i.target.value && s("react", t.reaction)),
          onClick: e[2] || (e[2] = r(() => {
          }, ["stop", "prevent"]))
        }, null, 40, f))
      ])),
      t.isMy ? o("", !0) : (n(), l("button", {
        key: 3,
        class: "rounded-2xl flex items-center pl-1 pr-1 mr-1",
        onClick: e[4] || (e[4] = r((i) => s("react", "🗑"), ["stop", "prevent"]))
      }, e[7] || (e[7] = [
        u("div", { class: "i-la-minus" }, null, -1)
      ])))
    ], 4)) : o("", !0);
  }
};
export {
  B as default
};
//# sourceMappingURL=PostReactionButton-gCR75mWf.js.map
