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

@section('title', 'Save The Food Product Details')

@section('content')
    <div class="flex justify-between items-center mb-6">
        <h1 class="text-2xl font-bold">Save The Food Product Details</h1>
        <div class="space-x-2">
            <a href="{{ route('admin.save-the-food-products.edit', $saveTheFoodProduct->id) }}" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">Edit</a>
            <a href="{{ route('admin.save-the-food-products.index') }}" class="bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600">Back</a>
        </div>
    </div>
    <div class="bg-white rounded-lg shadow p-6 max-w-lg">
        <table class="w-full">
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">ID</td><td class="py-3">{{ $saveTheFoodProduct->id }}</td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Product</td><td class="py-3">{{ $saveTheFoodProduct->product?->name ?? 'N/A' }}</td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Discount %</td><td class="py-3">{{ $saveTheFoodProduct->discount_percentage }}%</td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Stock Remaining</td><td class="py-3">{{ $saveTheFoodProduct->stock_remaining }}</td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Expires At</td><td class="py-3">{{ $saveTheFoodProduct->expires_at ? \Carbon\Carbon::parse($saveTheFoodProduct->expires_at)->format('Y-m-d') : '-' }}</td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Featured</td><td class="py-3">{{ $saveTheFoodProduct->is_featured ? 'Yes' : 'No' }}</td></tr>
            <tr><td class="py-3 font-medium text-gray-600">Created</td><td class="py-3">{{ $saveTheFoodProduct->created_at->format('Y-m-d H:i') }}</td></tr>
        </table>
    </div>
@endsection
