<x-app-layout>
    <x-slot name="header">{{ __('app.employee_payments') }}</x-slot>

    <div class="card shadow-sm">
        <div class="card-body p-0">
            <div class="table-responsive">
                <table class="table table-striped mb-0">
                    <thead class="table-light">
                        <tr>
                            <th>{{ __('Employee') }}</th>
                            <th>{{ __('Payment Date') }}</th>
                            <th>{{ __('Amount') }}</th>
                            <th>{{ __('Method') }}</th>
                            <th>{{ __('Notes') }}</th>
                        </tr>
                    </thead>
                    <tbody>
                        @forelse($payments as $payment)
                            <tr>
                                <td>{{ $payment->employee->name }}</td>
                                <td>{{ $payment->payment_date->format('Y-m-d') }}</td>
                                <td>{{ number_format($payment->amount, 2) }} {{ $payment->currency?->symbol ?? '' }}</td>
                                <td>{{ ucfirst($payment->method) }}</td>
                                <td>{{ $payment->notes }}</td>
                            </tr>
                        @empty
                            <tr>
                                <td colspan="5" class="text-center">{{ __('No payments found.') }}</td>
                            </tr>
                        @endforelse
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <div class="mt-3">{{ $payments->links() }}</div>
</x-app-layout>
