-@extends('backend.dashboard')

@section('content')
<div class="container-fluid">
    <div class="row justify-content-center">
        <div class="col-md-8">

            <div class="card shadow-sm">
                <!-- Card Header -->
                <div class="card-header bg-primary text-white d-flex justify-content-center">
                    <h3 class="card-title mb-0">Early Learning Details</h3>
                </div>

                <div class="card-body">

                    <table class="table table-bordered">
                        <!-- Image Row -->
                        <tr>
                            <th width="30%">Image</th>
                            <td>
                                @if($bookOffer->image)
                                    <img src="{{ asset($bookOffer->image) }}" width="100" alt="bookOffer Image">
                                @else
                                    <span class="text-muted">No Image</span>
                                @endif
                            </td>
                        </tr>

                        <!-- Name -->
                        <tr>
                            <th width="30%">Alt Text</th>
                            <td>{{ $bookOffer->alt_text ?? '—' }}</td>
                        </tr>

                        <!-- Description -->
                        <tr>
                            <th>Title</th>
                            <td>{{ $bookOffer->title ?? '—' }}</td>
                        </tr>
                        <tr>
                            <th>Author</th>
                            <td>{{ $bookOffer->author ?? '—' }}</td>
                        </tr>

{{--
                        <tr>
                            <th>Price</th>
                            <td>{{ $bookOffer->price ?? '—' }}</td>
                        </tr> --}}
                        <tr>
                            <th>Amazon Link</th>
                            <td>{{ $bookOffer->amazon_link ?? '—' }}</td>
                        </tr>
                        <tr>
                            <th>Category</th>
                            <td>{{ $bookOffer->category->title ?? '—' }}</td>
                        </tr>

                        {{-- <tr>
                            <th>Slug</th>
                            <td>{{ $bookOffer->slug ?? '—' }}</td>
                        </tr> --}}



                        <!-- Status -->
                        <tr>
                            <th>Status</th>
                            <td>
                                @if($bookOffer->status == 1)
                                    <span class="badge bg-primary">Active</span>
                                @else
                                    <span class="badge bg-danger">De-Active</span>
                                @endif
                            </td>
                        </tr>

                        <!-- Priority -->
                        <tr>
                            <th>Priority</th>
                            <td>{{ $bookOffer->priority ?? '—' }}</td>
                        </tr>
                    </table>

                </div>

                <!-- Card Footer -->
                <div class="card-footer text-end">
                    <a href="{{ route('book-offers.index') }}" class="btn btn-primary">
                        <i class="fa fa-arrow-left"></i> Back
                    </a>
                </div>
            </div>

        </div>
    </div>
</div>
@endsection
