import { useUser as u, ref as p, unref as d, openBlock as a, createElementBlock as r, withModifiers as g, createCommentVNode as f } from "./composables-Ci32s3jE.js";
const h = {
  key: 0,
  class: "i-la-star"
}, m = {
  key: 1,
  class: "i-la-star-solid"
}, v = {
  __name: "PostActionStar",
  props: {
    tag: { type: String, default: "" },
    hash: { type: String, default: "" }
  },
  setup(c) {
    const { user: n } = u(), t = c, s = p(!1), i = n.db.get("posts").get(`${t.tag}`).get(t.hash);
    i.on((o, e) => {
      s.value = o;
    });
    function l(o = t.tag, e = t.hash) {
      i.put(!s.value);
    }
    return (o, e) => d(n).is ? (a(), r("button", {
      key: 0,
      class: "m-1 button items-center",
      onClick: e[0] || (e[0] = g((_) => l(), ["stop", "prevent"]))
    }, [
      s.value ? (a(), r("div", m)) : (a(), r("div", h))
    ])) : f("", !0);
  }
};
export {
  v as default
};
//# sourceMappingURL=PostActionStar-BxODDNAz.js.map
