@extends('admin.layouts.main')
@section('section')
    <!-- Page sidebar end-->

    <div class="page-body">
        <div class="container-fluid">
            <div class="row page-title">
                <div class="col-sm-6">
                    <h3>Tag List</h3>
                </div>
                <div class="col-sm-6">
                    <nav>
                        <ol class="breadcrumb justify-content-sm-end align-items-center">
                            <li class="breadcrumb-item"> <a href="index.html">
                                    <svg class="svg-color">
                                        <use href="{{ asset('assets/svg/iconly-sprite.svg#Home') }}"></use>
                                    </svg></a></li>
                            <li class="breadcrumb-item">Tag</li>
                            <li class="breadcrumb-item active">Tag List</li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>

        <!-- Container-fluid starts-->
        <div class="container-fluid list-products">
            <div class="row">
                <div class="col-md-12 project-list">
                    <div class="card">
                        <div class="row">
                            <div class="col-md-6">
                                <ul class="nav nav-tabs border-tab" id="top-tab" role="tablist">
                                    <li class="nav-item"><a class="nav-link active" id="top-home-tab" data-bs-toggle="tab"
                                            href="#top-home" role="tab" aria-controls="top-home" aria-selected="true">
                                            <svg class="feather">
                                                <use
                                                    href="{{ asset('assets/svg/feather-icons/dist/feather-sprite.svg#target') }}">
                                                </use>
                                            </svg>All</a></li>
                                    <li class="nav-item"><a class="nav-link" id="profile-top-tab" data-bs-toggle="tab"
                                            href="#top-profile" role="tab" aria-controls="top-profile"
                                            aria-selected="false">
                                            <svg class="feather">
                                                <use
                                                    href="{{ asset('assets/svg/feather-icons/dist/feather-sprite.svg#info') }}">
                                                </use>
                                            </svg>Doing</a></li>
                                    <li class="nav-item"><a class="nav-link" id="contact-top-tab" data-bs-toggle="tab"
                                            href="#top-contact" role="tab" aria-controls="top-contact"
                                            aria-selected="false">
                                            <svg class="feather">
                                                <use
                                                    href="{{ asset('assets/svg/feather-icons/dist/feather-sprite.svg#check-circle') }}">
                                                </use>
                                            </svg>Done</a></li>
                                </ul>
                            </div>
                            <div class="col-md-6 d-md-block d-none">
                                <div class="form-group mb-0 me-0"> </div><a
                                    class="btn btn-primary d-flex align-items-center" href="{{ route('tag.add') }}">
                                    <svg class="feather">
                                        <use
                                            href="{{ asset('assets/svg/feather-icons/dist/feather-sprite.svg#plus-square') }}">
                                        </use>
                                    </svg>Add New Tag </a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <!-- Invoice menu-->
                    <div class="card">

                        <div class="card-body">
                            <div class="table-responsive theme-scrollbar product-table">
                                <table class="display" id="basic-3">
                                    <thead>
                                        <tr>
                                            <th>S.no</th>
                                            <th>Name</th>
                                            
                                            <th>Status</th>
                                            
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        @foreach ($tags as $category)
                                            <tr>
                                                <td>{{ $loop->iteration }}</td>
                                                <td>{{ $category->name }}</td>
                                                

                                                <td>
                                                    <a href="{{ route('category.status', $category->id) }}">
                                                        {!! $category->status == 1
                                                            ? '<span class="badge rounded-pill badge-success">Show</span>'
                                                            : '<span class="badge rounded-pill badge-danger">Hide</span>' !!}
                                                    </a>
                                                </td>
                                                
                                                
                                                <td>
                                                    <a href="{{ route('delete.category', $category->id) }}"
                                                        class="btn btn-danger btn-xs" title="Delete">Delete</a>
                                                    <a href="{{ route('edit.category', $category->id) }}"
                                                        class="btn btn-primary btn-xs" title="Edit">Edit</a>
                                                </td>
                                            </tr>
                                        @endforeach
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Container-fluid ends-->
    <script src="{{ asset('assets/js/vendors/simple-datatables/dist/umd/simple-datatables.js') }}"></script>

    <script src="{{ asset('assets/js/product/product-list-custom.js') }}"></script>
@endsection
