import { ref as u, createElementBlock as a, createCommentVNode as p, unref as d, openBlock as r, withModifiers as m } from "vue";
import { useUser as f } from "./composables-BAZQlC3e.js";
const g = {
  key: 0,
  class: "i-la-star"
}, h = {
  key: 1,
  class: "i-la-star-solid"
}, y = {
  __name: "PostActionStar",
  props: {
    tag: { type: String, default: "" },
    hash: { type: String, default: "" }
  },
  setup(c) {
    const { user: n } = f(), t = c, s = u(!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 ? (r(), a("button", {
      key: 0,
      class: "m-1 button items-center",
      onClick: e[0] || (e[0] = m((_) => l(), ["stop", "prevent"]))
    }, [
      s.value ? (r(), a("div", h)) : (r(), a("div", g))
    ])) : p("", !0);
  }
};
export {
  y as default
};
//# sourceMappingURL=PostActionStar-OPvfPZ5n.js.map
