<x-app-layout>
    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                <div class="p-6 text-gray-900">
					<h1 class="text-2xl font-bold mb-4">Subjects</h1>

					@if (session('success'))
						<div class="bg-green-100 text-green-800 p-3 rounded mb-4">
							{{ session('success') }}
						</div>
					@endif

					@if ($subjects->isEmpty())
						<p>No subjects found.</p>
					@else
						<ul class="list-disc pl-5">
							@foreach ($subjects as $subject)
								<li>{{ $subject->name }}</li>
							@endforeach
						</ul>
					@endif

					<div class="mt-6">
						<a href="{{ route('admin.subjects.create') }}"
						   class="px-4 py-2 bg-gray-200 border border-gray-300 rounded-md
								   font-semibold text-sm text-black hover:bg-gray-300
								   focus:outline-none focus:ring focus:ring-gray-400 transition">
							Add New Subject
						</a>
					</div>
                </div>
            </div>
        </div>
    </div>
</x-app-layout>