@extends('admin.layouts.app')
@section('title', 'Products')
@section('content')
    <div class="product-list-container">
        <div class="table-header">
            <a href="{{ route('admin.category.create') }}" class="add-product-btn"><i class="fas fa-plus-circle"></i> Add New Category</a>
        </div>
         <div class="table-responsive bg-white p-3">
        <table id="productTable" class="table table-hover">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Description</th>
                    <th>Actions</th>
                </tr>
            </thead>
            <tbody>
                @foreach($categories as $category)
                <tr>
                    <td>{{ $category->name }}</td>
                    <td>{{ $category->description }}</td>
                    <td class="action-buttons text-end">
                        <a href="{{ route('admin.category.edit', $category->id) }}" class="edit-btn btn"><i class="fas fa-edit"></i></a>
                        <a href="{{ route('admin.category.delete', $category->id) }}" class="delete-btn btn"><i class="fas fa-trash-alt"></i></a>
                    </td>
                </tr>
                @endforeach
            </tbody>

        </table>
      </div>
    </div>
@endsection