@include('includes.header')

<div class="page-wrapper">
    <div class="page-content">

        <!-- Page Header + Controls -->
        <div class="card border-0 shadow-sm mb-3">
            <div class="card-body d-flex flex-wrap justify-content-between align-items-center gap-2">

                <!-- Left: Title + Info -->
                <div>
                    <h5 class="mb-0 text-uppercase">Employees List</h5>

                </div>

                <!-- Right: Actions -->
                <div class="d-flex align-items-center gap-2">

                    <!-- Search -->
                    <input type="text" class="form-control form-control-sm" style="width: 220px;"
                        placeholder="🔍 Search store...">

                    <!-- Add Button -->
                    <a href="{{ route('store.employee.create') }}" class="btn btn-success btn-sm px-3">
                        <i class="bx bx-plus"></i> Add Employee
                    </a>

                </div>

            </div>


            <!-- Table Card -->
            <div class="card border-0 shadow-sm">
                <div class="card-body p-0">

                    <div class="table-responsive">
                        <table class="table table-hover align-middle mb-0">

                            <!-- Table Head -->
                            <thead class="bg-light">
                                <tr>
                                    <th class="ps-4" width="60">S.NO</th>
                                    <th>Profile Image</th>
                                    <th>Full Name</th>

                                    <th>Email</th>
                                    <th width="160">Phone</th>

                                    <th width="160" class="text-center">Actions</th>
                                </tr>
                            </thead>

                            <!-- Table Body -->
                            <tbody>
                                @foreach ($employees as $store)
                                    <tr>
                                        <td>{{ $loop->iteration }}</td>

                                        <td>
                                            @if ($store->image)
                                                <img src="{{ asset('employees/' . $store->image) }}" width="45"
                                                    height="45" class="rounded border">
                                            @endif
                                        </td>

                                        <td>
                                            {{ $store->first_name . ' ' . $store->last_name }}
                                        </td>

                                        <td>{{ $store->email }}</td>
                                        <td>{{ $store->phone }}</td>



                                        <td class="text-center">
                                            <div class="d-flex justify-content-center gap-2">

                                               

                                                <button class="btn btn-sm btn-outline-danger">
                                                    <i class="bx bx-trash"></i>
                                                </button>

                                            </div>
                                        </td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>
                    </div>

                </div>

                <!-- Pagination -->
                <div class="card-footer bg-white d-flex justify-content-between align-items-center">

                    <small class="text-muted">
                        Showing <b>1</b> to <b>2</b> of <b>10</b> entries
                    </small>

                    <ul class="pagination pagination-sm mb-0">
                        <li class="page-item disabled"><a class="page-link">Previous</a></li>
                        <li class="page-item active"><a class="page-link">1</a></li>
                        <li class="page-item"><a class="page-link">2</a></li>
                        <li class="page-item"><a class="page-link">3</a></li>
                        <li class="page-item"><a class="page-link">Next</a></li>
                    </ul>

                </div>
            </div>
        </div>

    </div>
</div>

@include('includes.footer')
