
<?php $__env->startSection('title', 'Landing Features'); ?>

<?php $__env->startSection('css'); ?>
<link href="<?php echo e(asset('/public/backEnd/')); ?>/assets/libs/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="<?php echo e(asset('/public/backEnd/')); ?>/assets/libs/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css" rel="stylesheet">
<style>
    .card { border: none; box-shadow: 0 0 20px rgba(18,38,63,.03); border-radius: 12px; }
    .badge-soft-success { background-color: rgba(10,207,151,.18); color: #0acf97; }
    .badge-soft-danger  { background-color: rgba(250,92,124,.18);  color: #fa5c7c; }
</style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid">
    <div class="row mb-3 mt-3">
        <div class="col-12 d-flex justify-content-between align-items-center">
            <h4 class="page-title mb-0 fw-bold">Features Section <small class="text-muted fs-6">(কেন খেজুর নিবেন?)</small></h4>
            <a href="<?php echo e(route('admin.landing-features.create')); ?>" class="btn btn-primary rounded-pill px-4">
                <i class="fe-plus me-1"></i> Add Feature
            </a>
        </div>
    </div>

    
    <div class="row mb-4">
        <div class="col-lg-6">
            <div class="card">
                <div class="card-body">
                    <h6 class="fw-bold mb-3 text-muted">Section Title সেট করুন</h6>
                    <form action="<?php echo e(route('admin.landing-features.section-title')); ?>" method="POST" class="d-flex gap-2">
                        <?php echo csrf_field(); ?>
                        <input type="text" name="features_section_title"
                            value="<?php echo e(optional($generalsetting)->features_section_title ?? 'কেন সুক্কারী মুফাতাল খেজুর নিবেন?'); ?>"
                            class="form-control" required>
                        <button type="submit" class="btn btn-success px-4 text-nowrap">
                            <i class="fe-save me-1"></i> Save
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </div>

    
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <table id="datatable" class="table table-hover w-100 dt-responsive nowrap">
                        <thead>
                            <tr>
                                <th>#</th>
                                <th>Icon</th>
                                <th>Title</th>
                                <th>Description</th>
                                <th>Sort</th>
                                <th>Status</th>
                                <th class="text-end">Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $features; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $feature): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($loop->iteration); ?></td>
                                <td>
                                    <?php if($feature->icon): ?>
                                        <i class="<?php echo e($feature->icon); ?> text-success fs-5"></i>
                                    <?php else: ?>
                                        <span class="text-muted">—</span>
                                    <?php endif; ?>
                                </td>
                                <td class="fw-semibold"><?php echo e($feature->title); ?></td>
                                <td class="text-muted small"><?php echo e(\Illuminate\Support\Str::limit($feature->description, 50)); ?></td>
                                <td><?php echo e($feature->sort_order); ?></td>
                                <td>
                                    <?php if($feature->status): ?>
                                        <span class="badge badge-soft-success">Active</span>
                                    <?php else: ?>
                                        <span class="badge badge-soft-danger">Inactive</span>
                                    <?php endif; ?>
                                </td>
                                <td class="text-end">
                                    <div class="d-inline-flex gap-2">
                                        <a href="<?php echo e(route('admin.landing-features.edit', $feature->id)); ?>" class="btn btn-sm btn-light border" title="Edit">
                                            <i class="fe-edit"></i>
                                        </a>
                                        <form method="POST" action="<?php echo e(route('admin.landing-features.destroy')); ?>" class="d-inline" onsubmit="return confirm('Delete this feature?');">
                                            <?php echo csrf_field(); ?>
                                            <input type="hidden" name="hidden_id" value="<?php echo e($feature->id); ?>">
                                            <button type="submit" class="btn btn-sm btn-light border text-danger">
                                                <i class="fe-trash-2"></i>
                                            </button>
                                        </form>
                                    </div>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
<script src="<?php echo e(asset('/public/backEnd/')); ?>/assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="<?php echo e(asset('/public/backEnd/')); ?>/assets/libs/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script>$('#datatable').DataTable();</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backEnd.layouts.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/creativedesignbd/land1.creativedesign.com.bd/resources/views/backEnd/landing/features/index.blade.php ENDPATH**/ ?>