<div class="site-menu">
  <label for="site_menu_trigger_input"></label>
  <ul>
    <li>
        
      <?php if(isset($_SESSION['user_id'])): ?>
      <div class="side-menu-user-info">
          <div class="profile-menu-user-info">
            <span class="username"><?= $user['username']; ?></span>
            <div class="user-loyalty-menu">
              <img loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/loyalty/badge/bronze.svg?v=20241125" />
              <span class="loyalty-level bronze">BRONZE</span>
            </div>
          </div>
          <div class="side-menu-balance-field">
            <div class="balance">
              <div class="real-balance">
                IDR
                <span class="total_balance"><?= htmlspecialchars(number_format($total_saldo, 0, ',', '.')); ?></span>
              </div>
              <div class="locked-balance locked_balance_container" hidden>
                <div class="lock-balance-assets">
                  <img id="locked-balance" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/icons/wallet/lock-balance.svg?v=20241125" />
                </div>
                IDR
                <span class="total_locked_balance">
                  0.00
                </span>
              </div>
            </div>
          </div>
          <a href="/mobile/loyalty/rewards" class="side-menu-balance-field">
            <div class="lp-label">LP</div>
            <span class="loyalty-point">0</span>
          </a>
          <a href="/mobile/loyalty/benefits" class="side-menu-balance-field">
            <div class="xp-label">EXP</div>
            <div class="experience-point">0</div>
          </a>
          <div class="buttons-container">
            <a href="#" class="logout-button" onclick="window.closeWindows(); document.querySelector('#logout-form').submit();">
              <form action="/Account/Logout" id="logout-form" method="post">Keluar</form>
            </a>
          </div>
      </div>
      </li>
      <?php else: ?>
      <form action="/Account/Login" method="post">
        <input type="hidden" name="csrf_token" value="<?= $csrf_token; ?>">
        <div class="side-menu-login-panel">
          <div class="login-panel-item">
            <i data-icon="username" style="--image-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/login/username.svg?v=20241125);"></i>
            <input type="text" name="username" placeholder="Nama Pengguna" />
          </div>
          <div class="login-panel-item">
            <i data-icon="password" style="--image-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/login/password.svg?v=20241125);"></i>
            <input type="password" name="password" placeholder="Kata Sandi" />
          </div>
          <div class="buttons-container">
            <input type="submit" class="login-button" value="Masuk" />
            <a href="/mobile/register" class="register-button">
              Daftar
            </a>
          </div>
        </div>
      </form>
    </li>
    <?php endif; ?>
    
    <li>
      <a href="#" class="search_popup_button">
        <i data-icon="search">
          <img alt="Search" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/search.svg?v=20241125" width="18" />
        </i>
        Pencarian
      </a>
    </li>
    
    <?php if(isset($_SESSION['user_id'])): ?>
    <li>
      <a href="/mobile/account-summary">
        <i data-icon="my-account">
          <img alt="MyAccount" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/profile.svg?v=20241125" width="18" />
        </i>
        Akun Saya
      </a>
    </li>
    <li>
      <a href="/mobile/deposit">
        <i data-icon="wallet">
          <img alt="Wallet" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/wallet.svg?v=20241125" width="18" />
        </i>
        Banking
      </a>
    </li>
    <li>
      <a href="/mobile/bonus">
        <i data-icon="claims">
          <img alt="Claims" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/claims.svg?v=20241125" width="18" />
        </i>
        Bonus
      </a>
    </li>
    <li>
      <a href="/mobile/messages/inbox">
        <i data-icon="message" data-new-notification="false">
          <img alt="Message" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/message.svg?v=20241125" width="18" />
        </i>
        Pesan
      </a>
    </li>
    <?php endif; ?>

    <li>
      <details>
        <summary>
          <section>
            <span>
              <i data-icon="games">
                <img alt="Games" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/games.svg?v=20241125" width="18" />
              </i>
              Permainan
            </span>
            <i class="glyphicon glyphicon-chevron-right"></i>
          </section>
        </summary>
        <article>
          <ul>
            <li>
              <a href="/mobile/hot-games">
                Hot Games
              </a>
            </li>
            <li>
              <a href="/mobile/slots">
                Slots
              </a>
            </li>
            <li>
              <a href="/mobile/casino">
                Live Casino
              </a>
            </li>
            <li>
              <a href="/mobile/others">
                Togel
              </a>
            </li>
            <li>
              <a href="/mobile/sport">
                Olahraga
              </a>
            </li>
            <li>
              <a href="/mobile/crash-game">
                Crash Game
              </a>
            </li>
            <li>
              <a href="/mobile/arcade">
                Arcade
              </a>
            </li>
            <li>
              <a href="/mobile/poker">
                Poker
              </a>
            </li>
            <li>
              <a href="/mobile/e-sports">
                E-Sports
              </a>
            </li>
            <li>
              <a href="/mobile/cockfight">
                Sabung Ayam
              </a>
            </li>
          </ul>
        </article>
      </details>
    </li>
    
    <?php if(isset($_SESSION['user_id'])): ?>
    <li>
      <a href="/mobile/loyalty/rewards">
        <i data-icon="loyalty-reward">
          <img alt="Loyalty Reward" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/loyalty-reward.svg?v=20241125" width="18" />
        </i>
        Hadiah Loyalitas
      </a>
    </li>
    <li>
      <a href="/mobile/statement/consolidate">
        <i data-icon="reporting">
          <img alt="Reporting" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/reporting.svg?v=20241125" width="18" />
        </i>
        Riwayat Taruhan
      </a>
    </li>
    <li>
      <a href="/mobile/history/bonus">
        <i data-icon="reporting">
          <img alt="Reporting" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/reporting.svg?v=20241125" width="18" />
        </i>
        Riwayat Klaim
      </a>
    </li>
    <?php endif; ?>

    <li>
      <div class="topbar-item language-selector-container" style="--image-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/flags.png?v=20241125);">
        <details>
          <summary>
            <section>
              <span>
                <i data-icon="language">
                  <img alt="Language" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/language.svg?v=20241125" width="18" />
                </i>
                BHS INDONESIA
              </span>
              <i class="glyphicon glyphicon-chevron-right"></i>
            </section>
          </summary>
          <article>
            <ul class="language-selector">
              <li>
                <a href="javascript:changeLanguage('en')">
                  <i data-language="en"></i>
                  <div class="language-name">
                    <div>ENGLISH</div>
                    <div>ENGLISH</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('id')">
                  <i data-language="id"></i>
                  <div class="language-name">
                    <div>BHS INDONESIA</div>
                    <div>INDONESIAN</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('kr')">
                  <i data-language="kr"></i>
                  <div class="language-name">
                    <div>한국어</div>
                    <div>KOREAN</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('cn')">
                  <i data-language="cn"></i>
                  <div class="language-name">
                    <div>中文</div>
                    <div>CHINESE</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('jp')">
                  <i data-language="jp"></i>
                  <div class="language-name">
                    <div>日本語</div>
                    <div>JAPANESE</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('th')">
                  <i data-language="th"></i>
                  <div class="language-name">
                    <div>ไทย</div>
                    <div>THAI</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('my')">
                  <i data-language="my"></i>
                  <div class="language-name">
                    <div>မြန်မာစာ</div>
                    <div>BURMESE</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('kh')">
                  <i data-language="kh"></i>
                  <div class="language-name">
                    <div>ខេមរភាសា</div>
                    <div>KHMER</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('hi')">
                  <i data-language="hi"></i>
                  <div class="language-name">
                    <div>हिन्दी</div>
                    <div>HINDI</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('ta')">
                  <i data-language="ta"></i>
                  <div class="language-name">
                    <div>தமிழ்</div>
                    <div>TAMIL</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('te')">
                  <i data-language="te"></i>
                  <div class="language-name">
                    <div>తెలుగు</div>
                    <div>TELUGU</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('vi')">
                  <i data-language="vi"></i>
                  <div class="language-name">
                    <div>Tiếng Việt</div>
                    <div>VIETNAMESE</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('bn')">
                  <i data-language="bn"></i>
                  <div class="language-name">
                    <div>বাংলাদেশী</div>
                    <div>BENGALI</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="javascript:changeLanguage('pt')">
                  <i data-language="pt"></i>
                  <div class="language-name">
                    <div>Portugu&#234;s</div>
                    <div>PORTUGESE</div>
                  </div>
                </a>
              </li>
            </ul>
          </article>
        </details>
      </div>
    </li>
    
    <li>
      <a href="/desktop/home" rel="nofollow">
        <i data-icon="desktop">
          <img alt="Desktop" height="18" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/menu/desktop.svg?v=20241125" width="18" />
        </i>
        Versi Desktop
      </a>
    </li>
  </ul>
</div>
