<?php $__env->startSection('content'); ?>
<input type="hidden" id="headerdata" value="<?php echo e(__('CATEGORY')); ?>">
<input type="hidden" id="attribute_data" value="<?php echo e(__('ADD NEW ATTRIBUTE')); ?>">
<!-- [ breadcrumb ] start -->
<div class="page-header">
    <div class="page-block">
        <div class="row align-items-center">
            <div class="col-md-12">
                <ul class="breadcrumb">
                    <li class="breadcrumb-item"><a href="<?php echo e(route('admin.dashboard')); ?>">হোম</a></li>
                    <li class="breadcrumb-item"><a href="javascript: void(0)">কন্টেন্ট</a></li>
                    <li class="breadcrumb-item" aria-current="page">Posts</li>
                </ul>
            </div>
            <div class="col-md-12">
                <div class="page-header-title">
                    <h2 class="mb-0"><?php echo e(__('All Posts')); ?></h2>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- [ breadcrumb ] end -->

<div class="row mb-3">
    <div class="col-lg-12 text-end">
        <a href="<?php echo e(route('admin.post.format')); ?>" class="btn btn-primary text-white">
            <i class="ti ti-plus me-1"></i> <?php echo e(__('Add New Post')); ?>

        </a>
    </div>
</div>

<div class="card tbl-card">
    <div class="card-header d-flex flex-wrap align-items-center justify-content-between p-3 gap-3">
        <h5 class="mb-0"><?php echo e(__('All Posts')); ?></h5>
        
        <div class="d-flex align-items-center gap-2 flex-wrap">
            <div>
                <select id="filter_lang" class="form-select form-select-sm">
                    <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option data-href="<?php echo e(route('post.datatables')); ?>?lang=<?php echo e($language->id); ?>" value="<?php echo e($language->id); ?>" <?php echo e($language->is_default==1 ? 'selected':''); ?>><?php echo e($language->language); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
            <div>
                <select id="category_id" class="form-select form-select-sm" style="min-width: 150px;">
                    <option value=""><?php echo e(__('Select Category')); ?></option>
                </select>
            </div>
        </div>
    </div>

    <!-- Bulk Actions Row -->
    <div class="selectPost px-3 py-2 bg-light border-bottom" style="display:none;">
        <div class="d-flex flex-wrap gap-2">
            <button class="btn btn-sm btn-danger delete" data-bs-toggle="modal" data-bs-target="#confirm-delete-option"><i class="ti ti-trash"></i> <?php echo e(__('Delete')); ?></button>
            <button id="add-to-slider" class="btn btn-sm btn-secondary"><i class="ti ti-plus"></i> <?php echo e(__('Add to Slider')); ?></button>
            <button id="add-to-breaking" class="btn btn-sm btn-secondary"><i class="ti ti-plus"></i> <?php echo e(__('Add to Breaking')); ?></button>
            <button id="add-to-feature" class="btn btn-sm btn-secondary"><i class="ti ti-plus"></i> <?php echo e(__('Add to Feature')); ?></button>
            <button id="add-to-slider-right" class="btn btn-sm btn-secondary"><i class="ti ti-plus"></i> <?php echo e(__('Add to Slider Right')); ?></button>
            <button id="remove-to-slider" class="btn btn-sm btn-outline-secondary"><i class="ti ti-minus"></i> <?php echo e(__('Remove to Slider')); ?></button>
            <button id="remove-to-breaking" class="btn btn-sm btn-outline-secondary"><i class="ti ti-minus"></i> <?php echo e(__('Remove to Breaking')); ?></button>
            <button id="remove-to-feature" class="btn btn-sm btn-outline-secondary"><i class="ti ti-minus"></i> <?php echo e(__('Remove to Feature')); ?></button>
            <button id="remove-to-slider-right" class="btn btn-sm btn-outline-secondary"><i class="ti ti-minus"></i> <?php echo e(__('Remove to Slider Right')); ?></button>
        </div>
    </div>

    <div class="card-body">
        <?php echo $__env->make('includes.admin.form-success', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        <?php echo $__env->make('includes.admin.flash-message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        <div class="table-responsive">
            <table id="geniustable" class="table table-hover table-borderless mb-0 dt-responsive" cellspacing="0" width="100%">
                <thead>
                    <tr>
                        <th><input type="checkbox" class="form-check-input m-0 p-0" id="headercheck"></th>
                        <th><?php echo e(__('Image')); ?></th>
                        <th><?php echo e(__('Title')); ?></th>
                        <th><?php echo e(__('Category')); ?></th>
                        <th><?php echo e(__('Language')); ?></th>
                        <th><?php echo e(__('Type')); ?></th>
                        <th><?php echo e(__('Views')); ?></th>
                        <th><?php echo e(__('Author')); ?></th>
                        <th><?php echo e(__('Post Status')); ?></th>
                        <th><?php echo e(__('Created At')); ?></th>
                        <th><?php echo e(__('Actions')); ?></th>
                    </tr>
                </thead>
            </table>
        </div>
    </div>
</div>


<div class="modal fade" id="modal1" tabindex="-1" role="dialog" aria-labelledby="modal1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="submit-loader"><img src="" alt=""></div>
            <div class="modal-header">
                <h5 class="modal-title"></h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo e(__('Close')); ?></button>
            </div>
        </div>
    </div>
</div>


<div class="modal fade" id="confirm-delete-option" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header d-block text-center">
                <h4 class="modal-title d-inline-block"><?php echo e(__('Confirm Delete')); ?></h4>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body text-center">
                <p><?php echo e(__('You are trying to delete post.')); ?></p>
                <p><?php echo e(__('Do you want to proceed?')); ?></p>
            </div>
            <div class="modal-footer justify-content-center">
                <button type="button" class="btn btn-default" data-bs-dismiss="modal"><?php echo e(__('Cancel')); ?></button>
                <a class="btn btn-danger bulk-delete"><?php echo e(__('Delete')); ?></a>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header d-block text-center">
                <h4 class="modal-title d-inline-block"><?php echo e(__('Confirm Delete')); ?></h4>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body text-center">
                <p><?php echo e(__('You are trying to delete post.')); ?></p>
                <p><?php echo e(__('Do you want to proceed?')); ?></p>
            </div>
            <div class="modal-footer justify-content-center">
                <button type="button" class="btn btn-default" data-bs-dismiss="modal"><?php echo e(__('Cancel')); ?></button>
                <a class="btn btn-danger btn-ok"><?php echo e(__('Delete')); ?></a>
            </div>
        </div>
    </div>
</div>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script type="text/javascript">
"use strict";
var table;
     table = $('#geniustable').DataTable({
        ordering: false,
        serverSide: true,
        ajax: '<?php echo e(route('post.datatables')); ?>',
        columns: [
            {data: 'checkbox',name: 'checkbox'},
            {data: 'image_big',name: 'image_big'},
            {data: 'title',name: 'title'},
            {data: 'category_id',name: 'category_id'},
            {data: 'language_id',name: 'language_id'},
            {data: 'post_type',name: 'post_type'},
            {data: 'views_count',name: 'views_count'},
            {data: 'admin_id',name: 'admin_id'},
            {data: 'is_approve',name: 'is_approve'},
            {data: 'created_at',name: 'created_at'},
            {data: 'action',searchable: false,orderable: false}
        ],
        drawCallback: function (settings) {
            $('.select').niceSelect();
        }
    });
</script>
<script src="<?php echo e(asset('assets/admin/js/post.js')); ?>"></script>
<script src="<?php echo e(asset('assets/admin/js/bulk.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/istiakahmedsourav/Desktop/JAMUNABKP/project/resources/views/admin/post/index.blade.php ENDPATH**/ ?>