import { ref as u, unref as p, openBlock as a, createElementBlock as r, withModifiers as d, createCommentVNode as m } from "vue";
import { useUser as f } from "./composables-5f691338.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 t = c, { user: n } = f(), 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) => p(n).is ? (a(), r("button", {
      key: 0,
      class: "m-1 button items-center",
      onClick: e[0] || (e[0] = d((_) => l(), ["stop", "prevent"]))
    }, [
      s.value ? (a(), r("div", h)) : (a(), r("div", g))
    ])) : m("", !0);
  }
};
export {
  y as default
};
//# sourceMappingURL=PostActionStar-404dec3c.js.map
