import { useColor as g, useGun as v, useUser as y, ref as D, useDictRecordsFor as b, openBlock as k, createElementBlock as S, createBaseVNode as s, toDisplayString as a, normalizeStyle as w, unref as e, langParts as B, renderSlot as C, createVNode as h, dictRecord as I, pushScopeId as L, popScopeId as N } from "./composables-Ci32s3jE.js";
import { DictLinkList as O, DictLinkButton as R } from "./components.js";
import { _export_sfc as V } from "./_plugin-vue_export-helper-DueaC3du.js";
const j = (t) => (L("data-v-bd8a1c3b"), t = t(), N(), t), z = { class: "flex flex-col rounded-xl text-xl p-2 bg-light-800 dark-bg-dark-400" }, E = { class: "flex flex-wrap items-center" }, F = { class: "inline-flex text-sm gap-1" }, G = { class: "font-bold" }, J = /* @__PURE__ */ j(() => /* @__PURE__ */ s("div", { class: "flex-1" }, null, -1)), P = {
  __name: "DictDefCard",
  props: {
    hash: {
      type: String,
      default: ""
    },
    authors: {
      type: Object,
      default: () => ({})
    }
  },
  setup(t) {
    const n = t, x = g("light"), _ = v(), { user: m } = y(), o = D();
    _.get("dict").get("#def").get(n.hash).once((l) => {
      o.value = JSON.parse(l);
    });
    const c = b(n.hash);
    return (l, U) => {
      var r, d, i, u, p, f;
      return k(), S("div", z, [
        s("div", {
          class: "text-lg flex items-center flex-wrap",
          style: w([{ "text-decoration-line": "underline" }, { textDecorationStyle: (d = e(B)[(r = o.value) == null ? void 0 : r.part]) == null ? void 0 : d.underline, textDecorationColor: e(x).hex(t.hash) }])
        }, a((i = o.value) == null ? void 0 : i.text), 5),
        s("div", E, [
          s("div", F, [
            s("div", G, a((u = o.value) == null ? void 0 : u.lang), 1),
            s("p", null, a((p = o.value) == null ? void 0 : p.part), 1)
          ]),
          C(l.$slots, "default", {}, void 0, !0),
          J,
          h(e(O), {
            links: e(c),
            type: "word"
          }, null, 8, ["links"]),
          h(e(R), {
            hash: t.hash,
            type: "def",
            my: (f = e(c)[e(I).word]) == null ? void 0 : f[e(m).pub]
          }, null, 8, ["hash", "my"])
        ])
      ]);
    };
  }
}, H = /* @__PURE__ */ V(P, [["__scopeId", "data-v-bd8a1c3b"]]);
export {
  H as default
};
//# sourceMappingURL=DictDefCard-82IrwUCJ.js.map
