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