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