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