import { ref as l, openBlock as i, createElementBlock as c, normalizeStyle as p, withModifiers as u, createElementVNode as h } from "vue";
import { gun as n } from "./composables-5f691338.js";
const d = /* @__PURE__ */ h("div", { class: "i-la-trash-alt" }, null, -1), f = [
  d
], _ = {
  __name: "PostActionBan",
  props: {
    tag: { type: String, default: "" },
    hash: { type: String, default: "" },
    host: { type: String, default: "" }
  },
  setup(s) {
    const e = s, a = l(!1);
    n.get("ban").get(e.hash).on((t) => {
      a.value = t;
    });
    async function r() {
      let t = await n.get("ban").get(e.hash).then();
      n.get("ban").get(e.hash).put(!t);
    }
    return (t, o) => (i(), c("button", {
      class: "m-1 button items-center",
      style: p({ color: a.value ? "red" : "inherit" }),
      onClick: o[0] || (o[0] = u((g) => r(), ["stop", "prevent"]))
    }, f, 4));
  }
};
export {
  _ as default
};
//# sourceMappingURL=PostActionBan-147299af.js.map
