@extends('admin::layouts.master')

@section('title', 'Basket Item Details')

@section('content')
    <div class="flex justify-between items-center mb-6">
        <h1 class="text-2xl font-bold">Basket Item #{{ $basketItem->id }}</h1>
        <a href="{{ route('admin.basket-items.index') }}" class="bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600">Back</a>
    </div>
    <div class="bg-white rounded-lg shadow p-6 max-w-lg">
        <table class="w-full">
            @foreach(['id', 'session_id', 'product_id', 'product_name', 'price', 'unit', 'unit_price', 'quantity', 'image_url'] as $field)
                <tr class="border-b">
                    <td class="py-2 font-medium text-gray-600">{{ ucwords(str_replace('_', ' ', $field)) }}</td>
                    <td class="py-2">{{ $basketItem->$field ?? '-' }}</td>
                </tr>
            @endforeach
            <tr><td class="py-2 font-medium text-gray-600">Created</td><td class="py-2">{{ $basketItem->created_at->format('Y-m-d H:i') }}</td></tr>
        </table>
    </div>
@endsection
