import { resolveComponent as _, openBlock as o, createElementBlock as r, Fragment as a, renderList as d, normalizeStyle as p, unref as t, withModifiers as x, createBlock as C, createCommentVNode as k } from "vue";
import { useColor as u, dictRecord as c, selectedUser as g } from "./composables-5f691338.js";
const b = { class: "flex flex-wrap gap-1 m-1" }, w = ["onClick"], z = {
  __name: "DictLinkList",
  props: {
    links: { type: [Array, Object], default: () => [] },
    type: { type: String, default: "def" },
    avatar: Boolean
  },
  emits: ["def", "word"],
  setup(l) {
    const i = u("light"), s = u("deep");
    return (f, h) => {
      const m = _("account-avatar");
      return o(), r("div", b, [
        (o(!0), r(a, null, d(l.links, (y, e) => (o(), r("div", {
          class: "p-2 rounded-xl flex gap-1 flex-wrap",
          key: e,
          style: p({ backgroundColor: e == t(c).word || e == t(c).def ? t(s).hex(e) : t(i).hex(e) }),
          onClick: x((v) => f.$emit(l.type, e), ["stop", "prevent"])
        }, [
          (o(!0), r(a, null, d(y, (v, n) => (o(), r("div", {
            class: "p-1 rounded-full",
            key: n,
            style: p({ backgroundColor: t(s).hex(n) })
          }, [
            e == t(c).word || e == t(c).def ? (o(), C(m, {
              key: 0,
              pub: n,
              size: 20,
              onClick: (B) => t(g).pub = n
            }, null, 8, ["pub", "onClick"])) : k("", !0)
          ], 4))), 128))
        ], 12, w))), 128))
      ]);
    };
  }
};
export {
  z as default
};
//# sourceMappingURL=DictLinkList-6dfd41e9.js.map
