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