import { c as A, p as g, h as y, f as x, b as v, d as S, u as _, s as O, o as P, e as E } from "./AssetItem-CFsdMEwW.js";
import { v as h, T as l, y as p, t as C, n as d, x as m, A as N, z as D, D as b, I as u, M as R, L as W, Y as B, S as Q } from "./index-BxjwuJ6T.js";
import { C as q } from "./ContentHeader-IUWmor6Y.js";
import { e as z } from "./each-BgMcYdMq.js";
import { S as F, Q as G, B as H, A as U } from "./assets-BxOq0o9B.js";
import { A as Y } from "./account-BPB9Ucub.js";
import { S as j } from "./scanner-Bm3Pvpfs.js";
var J = x('<button class="crtw-flex crtw-items-center crtw-gap-2 crtw-w-full crtw-p-2 crtw-rounded-md crtw-border crtw-border-black crtw-cursor-pointer crtw-transition-all crtw-duration-200 crtw-active:scale-95"><img alt="" class="crtw-w-6 crtw-h-6 crtw-flex-shrink-0"/> <span class="crtw-text-base crtw-font-medium crtw-flex-1 crtw-text-left"> </span></button>'), K = x('<div class="crtw-w-full crtw-flex crtw-flex-col crtw-gap-3 crtw-px-6 crtw-py-3"></div>');
function M(a, s) {
  if (new.target) return A({ component: M, ...a });
  h(s, !1);
  let n = g(s, "onClick", 12, () => {
  }), c = g(s, "showAssets", 12, !1);
  const w = [
    { title: "Sign Out", icon: F, page: l.LOGOUT },
    { title: "Show ID", icon: G, page: l.PASSPORT_ID },
    { title: "PassScan", icon: j, page: l.SCANNER },
    { title: "Wallet", icon: H, page: l.WALLET },
    {
      title: "Assets",
      icon: U,
      page: l.ASSETS,
      condition: c()
    },
    { title: "My Account", icon: Y, page: l.PROFILE }
  ].filter((t) => !t.condition || t.condition);
  var r = {
    get onClick() {
      return n();
    },
    set onClick(t) {
      n(t), d();
    },
    get showAssets() {
      return c();
    },
    set showAssets(t) {
      c(t), d();
    },
    $set: _,
    $on: (t, o) => S(s, t, o)
  };
  y();
  var e = K();
  return z(e, 5, () => w, (t) => t.page, (t, o) => {
    var i = J(), I = m(i), k = N(I, 2), L = m(k, !0);
    p(k), p(i), D(() => {
      O(I, "src", (u(o), b(() => u(o).icon))), P(L, (u(o), b(() => u(o).title)));
    }), E("click", i, () => n()(u(o).page)), v(t, i);
  }), p(e), v(a, e), C(r);
}
var V = x('<div class="crtw-w-full crtw-flex crtw-flex-col"><!> <!></div>');
function T(a, s) {
  if (new.target) return A({ component: T, ...a });
  h(s, !1);
  let n = g(s, "options", 12), { onClick: c, showAssets: f = !1 } = n();
  var w = {
    get options() {
      return n();
    },
    set options(o) {
      n(o), d();
    },
    $set: _,
    $on: (o, i) => S(s, o, i)
  }, r = V(), e = m(r);
  q(e, { text: "Navigation Menu" });
  var t = N(e, 2);
  return M(t, {
    get onClick() {
      return c;
    },
    get showAssets() {
      return f;
    }
  }), p(r), v(a, r), C(w);
}
function X(a, s) {
  if (new.target) return A({ component: X, ...a });
  h(s, !1);
  var n;
  const f = !!(!((n = R(W).walletAssets) === null || n === void 0) && n.length), w = (e) => {
    Q.set(e);
  };
  var r = {
    $set: _,
    $on: (e, t) => S(s, e, t)
  };
  y();
  {
    let e = B(() => ({
      onClick: w,
      showAssets: f
    }));
    T(a, {
      get options() {
        return u(e);
      }
    });
  }
  return C(r);
}
export {
  X as default
};
//# sourceMappingURL=NavMenu-CF3etHkl.js.map
