import { c as A, p as g, h as y, f as x, b as d, d as C, u as S, s as P, r as T, e as L } from "./AssetItem-BxjLUzNd.js";
import { t as _, Q as l, x as p, r as h, l as v, w as m, z as N, y as Q, C as b, E as u, J as R, I as W, V as B, O as D } from "./index-BBXAtvZr.js";
import { C as q } from "./ContentHeader-CNIXuMji.js";
import { e as z } from "./each-D1jTQ_vC.js";
import { S as F, Q as G, B as H, A as J } from "./assets-BxOq0o9B.js";
import { A as U } from "./account-BPB9Ucub.js";
import { S as V } 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 O(r, s) {
  if (new.target) return A({ component: O, ...r });
  _(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: V, page: l.SCANNER },
    { title: "Wallet", icon: H, page: l.WALLET },
    {
      title: "Assets",
      icon: J,
      page: l.ASSETS,
      condition: c()
    },
    { title: "My Account", icon: U, page: l.PROFILE }
  ].filter((t) => !t.condition || t.condition);
  var a = {
    get onClick() {
      return n();
    },
    set onClick(t) {
      n(t), v();
    },
    get showAssets() {
      return c();
    },
    set showAssets(t) {
      c(t), v();
    },
    $set: S,
    $on: (t, o) => C(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), M = m(k, !0);
    p(k), p(i), Q(() => {
      P(I, "src", (u(o), b(() => u(o).icon))), T(M, (u(o), b(() => u(o).title)));
    }), L("click", i, () => n()(u(o).page)), d(t, i);
  }), p(e), d(r, e), h(a);
}
var X = x('<div class="crtw-w-full crtw-flex crtw-flex-col"><!> <!></div>');
function E(r, s) {
  if (new.target) return A({ component: E, ...r });
  _(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), v();
    },
    $set: S,
    $on: (o, i) => C(s, o, i)
  }, a = X(), e = m(a);
  q(e, { text: "Navigation Menu" });
  var t = N(e, 2);
  return O(t, {
    get onClick() {
      return c;
    },
    get showAssets() {
      return f;
    }
  }), p(a), d(r, a), h(w);
}
function Y(r, s) {
  if (new.target) return A({ component: Y, ...r });
  _(s, !1);
  var n;
  const f = !!(!((n = R(W).walletAssets) === null || n === void 0) && n.length), w = (e) => {
    D.set(e);
  };
  var a = {
    $set: S,
    $on: (e, t) => C(s, e, t)
  };
  y();
  {
    let e = B(() => ({
      onClick: w,
      showAssets: f
    }));
    E(r, {
      get options() {
        return u(e);
      }
    });
  }
  return h(a);
}
export {
  Y as default
};
//# sourceMappingURL=NavMenu-BsBoijk5.js.map
