@layout('layouts/dashboard')
@set('title', 'Package Dracma items')
@section('body')
    
    <div class="grid-menu">
      <div class="content-wrapper">
      @include('../partials/dashboard/messages')
    <div style="text-align:center;padding:10px;background-color:rgba(0,0,0,0.2)" class="row text-center py-2 mb-3 justify-content-center">
      <a style="display:block;padding: 20px;background-color: rgba(0, 0, 0, 0.2)" class="btn btn-primary" href="{{ route('admin.create.packageitem') }}">
        Add Package Dracma items
      </a>
    </div>
    <div class="row">
      <div class="col-lg-12 grid-margin stretch-card">
        <div class="card">
          <div class="card-body">
            <h4 class="card-title">
              Package Dracma items
            </h4>
          </div>
          <div class="edit-news table-responsive p-4">
            <table class="table table-bordered text-center">
              <thead>
                <tr>
                  <th style="padding:10px 0;">Name</th>
                  <th style="padding:10px 0;">ID Item</th>
                  <th style="padding:10px 0;">Effect 01</th>
                  <th style="padding:10px 0;">Value Effect 01</th>
                  <th style="padding:10px 0;">Effect 02</th>
                  <th style="padding:10px 0;">Value Effect 02</th>
                  <th style="padding:10px 0;">Effect 03</th>
                  <th style="padding:10px 0;">Value Effect 03</th>
                  <th style="padding:10px 0;" colspan="2">Actions</th>
                </tr>
              </thead>
              <tbody>
                @each(item in data.rows)
                  <tr>
                    <td>{{ item.name }}</td>
                    <td>{{ item.item_id }}</td>
                    <td>{{ item.eff1 }}</td>
                    <td>{{ item.effv1 }}</td>
                    <td>{{ item.eff2 }}</td>
                    <td>{{ item.effv2 }}</td>
                    <td>{{ item.eff3 }}</td>
                    <td>{{ item.effv3 }}</td>
                    <td class="m-0 p-0">
                      <a href="{{ route('admin.update.packageitem', { slug: item.slug }) }}" class="m-0 px-3 py-1 btn btn-warning text-dark">Change</a>
                    </td>
                    <td class="m-0 p-0">
                      <a href="{{ route('auth.admin.delete.packageitem', { slug: item.slug }) }}" class="m-0 px-3 py-1 btn btn-danger">Delete</a>
                    </td>
                  </tr>
                @endeach
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
    @include('../partials/dashboard/pagination')
  </div>
  </div>
@end
