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