import { defineComponent as c, createElementBlock as t, openBlock as r, renderSlot as f, unref as o, normalizeStyle as s, createElementVNode as m } from "vue";
import { useColor as b, useAvatar as p } from "./composables-BAZQlC3e.js";
const h = { class: "flex flex-col items-center justify-center" }, y = ["width", "height", "src"], x = /* @__PURE__ */ c({
  __name: "AccountAvatar",
  props: {
    pub: { type: String, default: "" },
    size: { type: Number, default: 42 },
    border: { type: Number, default: 2 }
  },
  setup(e) {
    const l = e, i = b("deep"), { avatar: a, blink: d } = p(() => l.pub, () => l.size);
    return (u, n) => (r(), t("div", h, [
      e.pub ? (r(), t("img", {
        key: 0,
        class: "border rounded-full overflow-hidden transition duration-500 ease-out",
        style: s({ borderColor: o(d) ? o(i).hex(e.pub) : "transparent", borderWidth: `${e.border}px` }),
        width: e.size,
        height: e.size,
        src: o(a)
      }, null, 12, y)) : (r(), t("div", {
        key: 1,
        class: "p-0",
        style: s({ fontSize: e.size - 10 + "px" })
      }, n[0] || (n[0] = [
        m("div", { class: "i-la-user" }, null, -1)
      ]), 4)),
      f(u.$slots, "default")
    ]));
  }
});
export {
  x as default
};
//# sourceMappingURL=AccountAvatar-C9UnYeRh.js.map
