@extends('layouts.app')

@section('content')
    <div class="bg-white shadow rounded p-6">
        <div class="flex justify-between items-center mb-4">
            <h2 class="text-2xl font-bold">All Properties</h2>
        </div>
        <table class="min-w-full divide-y divide-gray-200">
            <thead class="bg-gray-100">
                <tr>
                    <th class="px-6 py-3 text-left text-sm font-medium">ID</th>
                    <th class="px-6 py-3 text-left text-sm font-medium">Property Name</th>
                    <th class="px-6 py-3 text-left text-sm font-medium">Price</th>
                    <th class="px-6 py-3 text-left text-sm font-medium">Security Deposit</th>
                    <!-- <th class="px-6 py-3 text-left text-sm font-medium">Action</th> -->
                </tr>
            </thead>
            <tbody class="divide-y divide-gray-100">
                @forelse($properties as $property)
                    <tr>
                        <td class="px-6 py-4">{{ $loop->iteration }}</td>
                        <td class="px-6 py-4">{{ $property->property_name }}</td>
                        <td class="px-6 py-4">{{ $property->price }}</td>
                        <td class="px-6 py-4">{{ $property->security_deposit }}</td>
                        <!-- <td class="px-6 py-4 flex space-x-2">
                            
                        </td> -->
                    </tr>
                @empty
                    <tr>
                        <td colspan="5" class="px-6 py-4 text-center text-gray-500">No properties found.</td>
                    </tr>
                @endforelse
            </tbody>
        </table>
    </div>
@endsection
