import { createElementBlock as p, openBlock as f, createElementVNode as m, renderSlot as h, createVNode as l, toDisplayString as k, unref as e } from "vue";
import { useUser as _, useColor as g, useWord as D, useDictRecordsFor as y, letterFilter as x, dictRecord as b } from "./composables-BAZQlC3e.js";
import { DictLinkList as v, DictLinkButton as B } from "./components.js";
import { _export_sfc as C } from "./_plugin-vue_export-helper-DueaC3du.js";
const L = { class: "flex items-center px-2 py-1 rounded-lg bg-light-700 dark-bg-dark-400 cursor-pointer capitalize" }, S = { class: "text-xl" }, W = {
  __name: "DictWordCard",
  props: {
    hash: { type: String, default: "" }
  },
  emits: ["def"],
  setup(t) {
    const r = t, { user: a } = _();
    g("light");
    const { word: c } = D(r.hash), o = y(r.hash);
    return (s, i) => {
      var n, d;
      return f(), p("div", L, [
        m("div", S, k(e(x)(e(c))), 1),
        h(s.$slots, "default", {}, void 0, !0),
        l(e(v), {
          links: e(o),
          onDef: i[0] || (i[0] = (u) => s.$emit("def", u))
        }, null, 8, ["links"]),
        l(e(B), {
          hash: t.hash,
          type: "word",
          my: (d = (n = e(o)) == null ? void 0 : n[e(b).def]) == null ? void 0 : d[e(a).pub]
        }, null, 8, ["hash", "my"])
      ]);
    };
  }
}, R = /* @__PURE__ */ C(W, [["__scopeId", "data-v-4f46251a"]]);
export {
  R as default
};
//# sourceMappingURL=DictWordCard-BXhvhIFa.js.map
