

<?php $__env->startSection('content'); ?>
<div class="content-area">
    <div class="mr-breadcrumb">
        <div class="row">
            <div class="col-lg-12">
                <h4 class="heading"><i class="fas fa-globe"></i> <?php echo e(__('Domain Pricing')); ?></h4>
                <ul class="links">
                    <li><a href="<?php echo e(route('admin.dashboard')); ?>"><?php echo e(__('Dashboard')); ?></a></li>
                    <li><?php echo e(__('Hosting Management')); ?></li>
                    <li><?php echo e(__('Domain Pricing')); ?></li>
                </ul>
            </div>
        </div>
    </div>

    <div class="product-area">
        <div class="row">
            <div class="col-lg-12">
                <div class="mr-table allproduct">
                    <div class="card shadow-sm border-0">
                        <div class="card-header bg-white d-flex justify-content-between align-items-center py-3">
                            <h5 class="m-0 font-weight-bold text-primary"><?php echo e(__('Extension List')); ?></h5>
                            <button class="add-btn btn-sm" data-toggle="modal" data-target="#addDomainModal">
                                <i class="fas fa-plus"></i> <?php echo e(__('Add New Extension')); ?>

                            </button>
                        </div>
                        
                        <div class="card-body">
                            <div class="table-responsive">
                                <table id="geniustable" class="table table-hover dt-responsive" cellspacing="0" width="100%">
                                    <thead class="bg-light">
                                        <tr>
                                            <th><?php echo e(__('Extension')); ?></th>
                                            <th><?php echo e(__('Registration')); ?></th>
                                            <th><?php echo e(__('Renewal')); ?></th>
                                            <th><?php echo e(__('Transfer')); ?></th>
                                            <th class="text-center"><?php echo e(__('Action')); ?></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $__currentLoopData = $extensions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ext): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td class="font-weight-bold text-primary"><?php echo e($ext->extension); ?></td>
                                            <td>
                                                <span class="badge badge-light border">৳ <?php echo e($ext->registration_price); ?></span>
                                            </td>
                                            <td>
                                                <span class="badge badge-light border">৳ <?php echo e($ext->renewal_price); ?></span>
                                            </td>
                                            <td>
                                                <span class="badge badge-light border">৳ <?php echo e($ext->transfer_price); ?></span>
                                            </td>
                                            <td class="text-center">
                                                <div class="action-list">
                                                    
                                                    <a href="javascript:;" data-toggle="modal" data-target="#editDomain<?php echo e($ext->id); ?>" class="btn btn-warning btn-sm shadow-sm mr-1" title="Edit">
                                                        <i class="fas fa-edit"></i>
                                                    </a>

                                                    
                                                    <a href="javascript:;" data-toggle="modal" data-target="#deleteModal<?php echo e($ext->id); ?>" class="btn btn-danger btn-sm shadow-sm" title="Delete">
                                                        <i class="fas fa-trash"></i>
                                                    </a>
                                                </div>
                                            </td>
                                        </tr>

                                        <div class="modal fade" id="editDomain<?php echo e($ext->id); ?>" tabindex="-1" role="dialog" aria-hidden="true">
                                            <div class="modal-dialog modal-dialog-centered" role="document">
                                                <div class="modal-content border-0 shadow">
                                                    <div class="modal-header bg-warning text-white">
                                                        <h5 class="modal-title"><i class="fas fa-edit mr-2"></i><?php echo e(__('Edit Domain Pricing')); ?></h5>
                                                        <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
                                                            <span aria-hidden="true">&times;</span>
                                                        </button>
                                                    </div>
                                                    <form action="<?php echo e(route('admin.hosting.domains.update', $ext->id)); ?>" method="POST">
                                                        <?php echo csrf_field(); ?>
                                                        <div class="modal-body p-4 text-left">
                                                            <div class="form-group mb-3">
                                                                <label class="font-weight-bold"><?php echo e(__('Extension')); ?></label>
                                                                <input type="text" name="extension" class="form-control" value="<?php echo e($ext->extension); ?>" required>
                                                            </div>
                                                            
                                                            <div class="row">
                                                                <div class="col-md-4">
                                                                    <div class="form-group mb-3">
                                                                        <label class="font-weight-bold"><?php echo e(__('Registration')); ?></label>
                                                                        <div class="input-group">
                                                                            <div class="input-group-prepend"><span class="input-group-text">৳</span></div>
                                                                            <input type="number" name="registration_price" class="form-control" value="<?php echo e($ext->registration_price); ?>" required>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="form-group mb-3">
                                                                        <label class="font-weight-bold"><?php echo e(__('Renewal')); ?></label>
                                                                        <div class="input-group">
                                                                            <div class="input-group-prepend"><span class="input-group-text">৳</span></div>
                                                                            <input type="number" name="renewal_price" class="form-control" value="<?php echo e($ext->renewal_price); ?>" required>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="form-group mb-3">
                                                                        <label class="font-weight-bold"><?php echo e(__('Transfer')); ?></label>
                                                                        <div class="input-group">
                                                                            <div class="input-group-prepend"><span class="input-group-text">৳</span></div>
                                                                            <input type="number" name="transfer_price" class="form-control" value="<?php echo e($ext->transfer_price); ?>" required>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="modal-footer bg-light">
                                                            <button type="button" class="btn btn-secondary shadow-sm" data-dismiss="modal"><?php echo e(__('Close')); ?></button>
                                                            <button type="submit" class="btn btn-primary shadow-sm px-4"><?php echo e(__('Update')); ?></button>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="modal fade" id="deleteModal<?php echo e($ext->id); ?>" tabindex="-1" role="dialog" aria-hidden="true">
                                            <div class="modal-dialog modal-dialog-centered" role="document">
                                                <div class="modal-content">
                                                    <div class="modal-header border-0">
                                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                                    </div>
                                                    <div class="modal-body text-center pb-5">
                                                        <i class="fas fa-exclamation-triangle fa-3x text-warning mb-3"></i>
                                                        <h4 class="mb-3">Are you sure?</h4>
                                                        <p class="text-muted">You are about to delete <strong><?php echo e($ext->extension); ?></strong> pricing.</p>
                                                    </div>
                                                    <div class="modal-footer justify-content-center border-0">
                                                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
                                                        <a href="<?php echo e(route('admin.hosting.domains.delete', $ext->id)); ?>" class="btn btn-danger">Confirm Delete</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="addDomainModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content border-0 shadow">
            <div class="modal-header bg-primary text-white">
                <h5 class="modal-title"><i class="fas fa-plus-circle mr-2"></i><?php echo e(__('Add New Extension')); ?></h5>
                <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <form action="<?php echo e(route('admin.hosting.domains.store')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <div class="modal-body p-4">
                    <div class="form-group mb-3">
                        <label class="font-weight-bold"><?php echo e(__('Extension')); ?> <span class="text-danger">*</span></label>
                        <input type="text" name="extension" class="form-control" placeholder="e.g. .com" required>
                    </div>

                    <div class="row">
                        <div class="col-md-4">
                            <div class="form-group mb-3">
                                <label class="font-weight-bold"><?php echo e(__('Registration')); ?></label>
                                <div class="input-group">
                                    <div class="input-group-prepend"><span class="input-group-text">৳</span></div>
                                    <input type="number" name="registration_price" class="form-control" placeholder="0" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group mb-3">
                                <label class="font-weight-bold"><?php echo e(__('Renewal')); ?></label>
                                <div class="input-group">
                                    <div class="input-group-prepend"><span class="input-group-text">৳</span></div>
                                    <input type="number" name="renewal_price" class="form-control" placeholder="0" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group mb-3">
                                <label class="font-weight-bold"><?php echo e(__('Transfer')); ?></label>
                                <div class="input-group">
                                    <div class="input-group-prepend"><span class="input-group-text">৳</span></div>
                                    <input type="number" name="transfer_price" class="form-control" placeholder="0" required>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer bg-light">
                    <button type="button" class="btn btn-secondary shadow-sm" data-dismiss="modal"><?php echo e(__('Close')); ?></button>
                    <button type="submit" class="btn btn-primary shadow-sm px-4"><?php echo e(__('Save')); ?></button>
                </div>
            </form>
        </div>
    </div>
</div>

<style>
    .card { border-radius: 10px; }
    .add-btn { background: #2d3274; color: #fff; border-radius: 50px; padding: 7px 20px; transition: 0.3s; border: none; cursor: pointer; }
    .add-btn:hover { background: #3e4491; }
    .badge { font-size: 14px; padding: 8px 12px; font-weight: 500; }
    .table thead th { border-top: none; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; vertical-align: middle; }
    .table tbody td { vertical-align: middle; }
    .modal-content { border-radius: 12px; overflow: hidden; }
    .input-group-text { background-color: #f8f9fa; border-color: #ced4da; font-weight: bold; }
</style>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/creativedesignbd/public_html/project/resources/views/admin/hosting/domains.blade.php ENDPATH**/ ?>