@extends('layouts.trading')

@section('content')
<div class="trade-card overflow-x-auto">
    <table class="w-full text-left text-sm">
        <thead class="border-b border-trade-border text-slate-400">
            <tr>
                <th class="pb-3 pr-4">Symbol</th>
                <th class="pb-3 pr-4">Side</th>
                <th class="pb-3 pr-4">Qty</th>
                <th class="pb-3 pr-4">Price</th>
                <th class="pb-3">Status</th>
            </tr>
        </thead>
        <tbody>
            @forelse ($data['recent_orders'] as $order)
                <tr class="border-b border-trade-border/50">
                    <td class="py-3 pr-4 text-white">{{ $order->tradingsymbol }}</td>
                    <td class="py-3 pr-4">{{ $order->transaction_type }}</td>
                    <td class="py-3 pr-4">{{ $order->quantity }}</td>
                    <td class="py-3 pr-4">₹{{ number_format($order->price ?? 0, 2) }}</td>
                    <td class="py-3"><span class="rounded bg-trade-panel px-2 py-1 text-xs">{{ $order->status }}</span></td>
                </tr>
            @empty
                <tr><td colspan="5" class="py-8 text-center text-slate-500">No orders yet.</td></tr>
            @endforelse
        </tbody>
    </table>
</div>
@endsection
