import { defineComponent as f, ref as p, resolveComponent as m, openBlock as n, createElementBlock as r, createElementVNode as o, Fragment as _, renderList as v, unref as s, createBlock as x, withDirectives as k, withKeys as w, vModelText as b } from "vue";
import { useUser as h, useAccount as g, addProfileField as d } from "./composables-5f691338.js";
const y = { class: "flex flex-col" }, B = { class: "flex flex-col p-2" }, C = { class: "flex items-center flex-wrap" }, F = /* @__PURE__ */ o("div", { class: "i-la-plus" }, null, -1), U = /* @__PURE__ */ o("div", { class: "p-1 text-sm" }, "Add", -1), $ = [
  F,
  U
], P = /* @__PURE__ */ f({
  __name: "UserProfile",
  setup(A) {
    const { user: i } = h(), { account: c } = g(i.pub), l = p("");
    return (E, e) => {
      const u = m("user-profile-field");
      return n(), r("div", y, [
        o("div", B, [
          (n(!0), r(_, null, v(s(c).profile, (t, a) => (n(), x(u, {
            key: t,
            field: `${a}`,
            content: t
          }, null, 8, ["field", "content"]))), 128)),
          o("div", C, [
            k(o("input", {
              class: "p-2 rounded-lg shadow-md dark-bg-dark-400",
              "onUpdate:modelValue": e[0] || (e[0] = (t) => l.value = t),
              placeholder: "New profile field",
              onKeydown: e[1] || (e[1] = w((t) => s(d)(l.value), ["enter"]))
            }, null, 544), [
              [b, l.value]
            ]),
            o("button", {
              class: "m-2 button items-center dark-bg-dark-400",
              onClick: e[2] || (e[2] = (t) => s(d)(l.value))
            }, $)
          ])
        ])
      ]);
    };
  }
});
export {
  P as default
};
//# sourceMappingURL=UserProfile-a0c99027.js.map
