<div class="pd-20 card-box">
       
    <div class="row"> 

        <div class="col-md-1">
            <div class="input-group custom ">
                <select wire:model.live="per_page"  class="form-control form-control-sm" >
                    <option value="10">10</option>
                    <option value="25">25</option>
                    <option value="50">50</option>
                    <option value="75">75</option>
                    <option value="100">100</option>
                </select>
            </div>
        </div>
        <div class="col-md-6 offset-md-2">
            <div class="input-group custom ">
                    <input
                        type="text"
                        class="form-control form-control-sm"
                        placeholder="recherche"
                        id="_filter"
                        wire:model.live="search"
                    />
                    <div class="input-group-append custom">
                        <span class="input-group-text"
                            ><i class="icon-copy dw dw-search"></i
                        ></span>
                    </div>
            </div>
        </div>
        <div class="col-md-2 text-right ">
            <button
            type="button"
            class="btn btn-primary btn-sm scroll-click"
            rel="content-y"
            wire:click="$dispatch('NewSociety')"
            
            ><i class="fa fa-plus"></i> Ajouter
        </button>
        </div>
    </div>

    <div  class="table-responsive">
        <table id="table" class="table-striped mb-2" border="1" style="width:100%; font-size:0.8rem;">
            
            <thead>
                <tr>
                    <td  class="pl-1" style="width: 3%;"><b>#</b></td>
                    <td  class="pl-1" style="width: 4%;"><b>Statut</b></td>
                    <td  align="center" style="width: 40%;"><b>Raison Sociale</b></td>
                    <td  align="center" style="width: 10%;"><b>Sigle</b></td>
                    <td  class="pl-1" style="width: 17%;"><b>Activité Principale</b></td>
                    <td  align="center" style=""><b>Ville</b></td>
                    <td align="center" style="width: 8%;"></td>
                </tr>
            </thead>
            <tbody>
                @php
                    $n = 1;
                @endphp
                @forelse($lists as $list )
                    <tr>
                        <td class="pl-1">{{ $n }}</td>
                        <td align="center">
                            @if($list->is_active)
                               <span style="color:green;"> <i class="icon-copy bi bi-circle-fill"></i></span>
                            @else
                                <span style="color:red;"> <i class="icon-copy bi bi-circle-fill"></i></span>
                            @endif
                        </td>
                        <td class="pl-1">{{ $list->raison_sociale }}</td>
                        <td class="pl-1">{{ $list->sigle }}</td>
                        <td class="pl-1">{{ $list->activite_principale }}</td>
                        <td class="pl-1">{{ $list->ville }}</td>
                        <td align="center">
                           <a class="text-primary" style="cursor:pointer;"
                            wire:click="$dispatch('editCustomer',[{{ $list->id }}])" ><i class="dw dw-edit2"></i></a
                            >
                       </td>
                    </tr>
                    @php
                        ++$n ;
                    @endphp
                @empty
                    <tr>
                        <td colspan="6" align="center">Aucune donnée trouvée</td>
                    </tr>
                @endforelse
                   
                
            </tbody>
            
        </table>
        {{ $lists->links() }}
        </div>
</div>



