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