{{-- Invoice line items for the report view modal. Expects: $items (InvoiceItem[]). --}}
<div class="overflow-x-auto">
    <table class="w-full text-sm">
        <thead>
            <tr class="border-b text-left text-xs text-gray-500 dark:text-gray-400">
                <th class="px-2 py-1.5">Item</th>
                <th class="px-2 py-1.5 text-right">Qty</th>
                <th class="px-2 py-1.5 text-right">Price</th>
                <th class="px-2 py-1.5 text-right">Total</th>
            </tr>
        </thead>
        <tbody>
            @forelse ($items as $item)
                <tr class="border-b last:border-0">
                    <td class="px-2 py-1.5">
                        <div class="font-medium">{{ $item->product_name }}</div>
                        <div class="text-xs text-gray-500 dark:text-gray-400">{{ $item->product_sku }}</div>
                    </td>
                    <td class="px-2 py-1.5 text-right tabular-nums">{{ rtrim(rtrim(number_format((float) $item->quantity, 4), '0'), '.') }}</td>
                    <td class="px-2 py-1.5 text-right tabular-nums">{{ number_format((float) $item->unit_price, 2) }}</td>
                    <td class="px-2 py-1.5 text-right tabular-nums">{{ number_format((float) $item->line_total, 2) }}</td>
                </tr>
            @empty
                <tr>
                    <td colspan="4" class="px-2 py-4 text-center text-xs text-gray-500 dark:text-gray-400">No items.</td>
                </tr>
            @endforelse
        </tbody>
    </table>
</div>
