<?php
require_once __DIR__ . "/../includes/currency_helper.php"; // make sure helper is included
?>
<div class="sidebar">
    <div class="sidebar-header">
        <h2></h2>
        <p></p>
    </div>

    <div class="sidebar-section">
        <h3>Accounts</h3>
        <?php foreach($accounts as $acc): ?>
            <div class="account-box">
                <b>Number: <?= htmlspecialchars($acc['account_number']) ?></b><br>
                <b>Name: <?= htmlspecialchars($user['first_name'] . ' ' . $user['last_name']) ?></b><br>
                Balance: <?= formatCurrency($acc['balance'], $acc['currency']) ?>
            </div>
        <?php endforeach; ?>
    </div>

    <div class="sidebar-section">
        <h3>Menu</h3>
        <a href="/user/dashboard.php">🏠 Dashboard</a>
        <a href="/transfer/initiate_transfer.php">💸 Fund Transfer</a>
        <a href="/user/transaction_history.php">📄 Transactions</a>
        <a href="/user/profile.php">👤 Profile</a>
        <a href="/user/notifications.php">🔔 Notifications</a>
        <a href="/auth/logout.php">🚪 Logout</a>
    </div>
</div>