<?php $__env->startSection('content'); ?>
<div class="d-flex justify-content-between align-items-center mb-4">
    <div>
        <h1 class="h3 mb-1">Account Summary</h1>
        <p class="text-muted mb-0">Current account balances by currency.</p>
    </div>
</div>

<form class="row g-2 mb-4 ajax-filter" method="GET" action="<?php echo e(route('accounts.summary')); ?>" data-ajax-target="#account-summary-results">
    <div class="col-md-4">
        <select class="form-select" name="currency_id">
            <option value="">All currencies</option>
            <?php $__currentLoopData = $currencies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $currency): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($currency->id); ?>" <?php if(($filters['currency_id'] ?? '') == $currency->id): echo 'selected'; endif; ?>><?php echo e($currency->code); ?> - <?php echo e($currency->name); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
    <div class="col-md-4">
        <select class="form-select" name="type">
            <option value="">All account types</option>
            <option value="bank" <?php if(($filters['type'] ?? '') === 'bank'): echo 'selected'; endif; ?>>Bank</option>
            <option value="cash" <?php if(($filters['type'] ?? '') === 'cash'): echo 'selected'; endif; ?>>Cash</option>
        </select>
    </div>
    <div class="col-md-4">
        <button class="btn btn-primary" type="submit">Filter</button>
    </div>
</form>

<div id="account-summary-results">
<div class="card">
    <div class="card-body">
        <div class="table-responsive">
            <table class="table table-striped align-middle">
                <thead>
                    <tr>
                        <th>Name</th>
                        <th>Currency</th>
                        <th class="text-end">Current Balance</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $accounts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $account): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td class="fw-semibold"><?php echo e($account->name); ?></td>
                            <td><?php echo e($account->currency->code); ?></td>
                            <td class="text-end"><?php echo e(number_format((float) $account->balance, 4)); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td class="text-muted text-center" colspan="3">No accounts added yet.</td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\christopher\currencychanger\resources\views/accounts/summary.blade.php ENDPATH**/ ?>