<div>
    <div class="container">
      <div class="  d-flex width-50 justify-content-center btn btn-sm bg-secondary text-center my-2 ">Index-Oi</div>
        <div class="d-flex justify-content-around ">
            <a href="{{route('indexoi-mail')}}" class="btn btn-secondary" role="button">Mail</a>
            <a href="{{route('indexoi-database')}}" class="btn btn-secondary" role="button">Database</a>
            
            
        </div>
        
    </div>
    {{-- <div class="  d-flex width-50 justify-content-center btn btn-sm bg-secondary text-center my-2 " >TECHNOPET Madagascar</div> --}}
    <hr>
    @if(session()->has('success'))
      <div class="alert alert-success " role = "alert">{{session()->get('success')}}</div>
    @endif
  
    @if($updateBdd)
    <div class="bg-secondary width-1px height-1px text-white text-center mx-25">Update Item</div>
      @include('livewire.tpm.bdd.update')
    @endif
    
    {{-- <button class="btn btn-sm d-flex width-50 justify-content-center " wire:click='create()'>Add New Email</button> --}}
    <a href="#" wire:click='create()' class="  d-flex width-50 justify-content-center btn btn-sm bg-secondary text-center my-2 text-white " role="button">Add New Item</a>
    @if($createItem)
    <div class="bg-secondary width-1px height-1px text-white text-center mx-25">New Item</div>
      @include('livewire.tpm.bdd.create')
    @endif
  
    {{-- <a href="#" class="  d-flex width-50 justify-content-center btn btn-sm bg-info text-center my-2 " role="button">Add New Database</a> --}}
    <div class="bg-secondary width-1px height-1px text-white text-center mx-25">Database-List</div>
    <div class="card my-4">
        <input class ="input" type="text" placeholder="Search" wire:model.debounce.800ms.live="search">
    </div>
    <div class="col mx-25">
        <table class="table table-striped table-hover ">
            <thead>
              <tr>
                
                <th >Item</th>
                <th >Ip</th>
                <th >Login</th>
                <th >Password</th>
                
              </tr>
            </thead>
            <tbody>
                @foreach($databases as $data)
              <tr>
                
                <td>{{$data->item}}</td>
                <td>{{$data->ip}}</td>
                <td>{{$data->login}}</td>
                <td>{{$data->pass}}</td>
                <td>
                    <a
                    href="#"wire:click="edit({{$data->id}})"
                    class="btn btn-secondary">Edit</a>
                    
                    <a href="#" wire:click="delete({{$data->id}})"
                    class="btn btn-danger">Delete</a>
                  </td>
                @endforeach
                
              </tr>
              </tbody>
              </table>
              {{$databases->links('livewire.pagination')}}
            </div>
              
</div>
