import { resolveComponent as f, openBlock as l, createElementBlock as i, normalizeStyle as v, unref as t, createElementVNode as o, toDisplayString as k, normalizeClass as x, withModifiers as g, Fragment as y, renderList as C, createBlock as b, createCommentVNode as w, pushScopeId as S, popScopeId as D } from "vue";
import { useColor as $, useWord as I, useDictRecordsFor as W, letterFilter as z, dictRecord as c } from "./composables-5f691338.js";
import { _export_sfc as B } from "./_plugin-vue_export-helper-6a641814.js";
const p = (e) => (S("data-v-70ccc87b"), e = e(), D(), e), F = { class: "flex items-center rounded-lg capitalize mb-4" }, P = { class: "text-2xl font-bold" }, E = /* @__PURE__ */ p(() => /* @__PURE__ */ o("div", { class: "flex-1" }, null, -1)), N = /* @__PURE__ */ p(() => /* @__PURE__ */ o("div", { class: "i-la-times text-xl" }, null, -1)), R = [
  N
], V = { class: "flex flex-wrap gap-2" }, j = {
  __name: "DictWordPage",
  props: {
    hash: { type: String, default: "" }
  },
  emits: ["def", "close"],
  setup(e) {
    const d = e, h = $("light"), { word: m } = I(d.hash), a = W(d.hash);
    return (u, s) => {
      const _ = f("dict-def-card");
      return l(), i("div", {
        class: "flex flex-col p-4 rounded-xl",
        style: v({ backgroundColor: t(h).hex(e.hash) })
      }, [
        o("div", F, [
          o("div", P, k(t(z)(t(m))), 1),
          o("div", {
            class: x(["i-la-link link", { active: t(c).word == e.hash || t(a)[t(c).def] }]),
            onClick: s[0] || (s[0] = g((n) => t(c).word = t(c).word == e.hash ? null : e.hash, ["stop", "prevent"]))
          }, null, 2),
          E,
          o("button", {
            class: "cursor-pointer p-2",
            onClick: s[1] || (s[1] = (n) => u.$emit("close"))
          }, R)
        ]),
        o("div", V, [
          (l(!0), i(y, null, C(t(a), (n, r) => (l(), i("div", {
            class: "p-0",
            key: r
          }, [
            Object.keys(n).length > 0 ? (l(), b(_, {
              key: 0,
              class: "cursor-pointer",
              hash: r,
              onClick: (L) => u.$emit("def", r)
            }, null, 8, ["hash", "onClick"])) : w("", !0)
          ]))), 128))
        ])
      ], 4);
    };
  }
}, A = /* @__PURE__ */ B(j, [["__scopeId", "data-v-70ccc87b"]]);
export {
  A as default
};
//# sourceMappingURL=DictWordPage-55a5053f.js.map
