

<?php $__env->startSection('content'); ?>

<style>
    .page-title {
        font-weight: 700;
        color: var(--bs-body-color);
    }

    .generate-card {
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 18px;
        background: var(--bs-body-bg);
        box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
        transition: .3s;
        overflow: hidden;
    }

    .generate-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, .12);
    }

    .card-header-custom {
        padding: 16px 18px;
        font-weight: 700;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .roi-header {
        background: linear-gradient(135deg, #0d6efd, #0dcaf0);
        color: #fff;
    }

    .bdb-header {
        background: linear-gradient(135deg, #198754, #20c997);
        color: #fff;
    }

    .history-btn {
        border-radius: 10px;
        padding: 6px 14px;
        font-size: 14px;
        font-weight: 600;
        background: rgba(255, 255, 255, .18);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, .25);
        text-decoration: none;
    }

    .history-btn:hover {
        background: rgba(255, 255, 255, .28);
        color: #fff;
    }

    .card-body-custom {
        padding: 22px;
    }

    .form-label {
        font-weight: 600;
    }

    .form-control {
        border-radius: 12px;
        padding: 10px 14px;
    }

    .btn-custom {
        border-radius: 12px;
        padding: 10px 24px;
        font-weight: 600;
    }
</style>

<div class="container-fluid">

    <h5 class="page-title mb-4"><button type="button" class="btn btn-icon bg-white me-2 waves-effect waves-light" style="box-shadow: 0px 9px 12px -2px #66328E1F;">
            <a href="<?php echo e(route('admin.diamond_advance')); ?>">
                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler">
                    <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                    <path d="M15 6l-6 6l6 6"></path>
                </svg>
            </a>
        </button>Diamond Generate</h5>

    <div class="row g-4 d-flex justify-content-center align-items-center">

        <!-- ROI -->
        <div class="col-lg-6">
            <div class="generate-card">

                <div class="card-header-custom roi-header">
                    <span>
                        <i class="ti tabler-chart-line me-2"></i>
                        Manually Generate ROI
                    </span>

                    <a href="<?php echo e(route('admin.diamond_roi_gen')); ?>" class="history-btn">
                        <i class="ti tabler-history me-1"></i> History
                    </a>
                </div>

                <div class="card-body-custom">
                    <form action="<?php echo e(route('admin.generate_manual_diamond_profit')); ?>" id="diamondForm" method="POST">
                        <?php echo csrf_field(); ?>

                        <div class="mb-3">
                            <label class="form-label">Select Date</label>
                            <input type="date" name="generate_date" class="form-control" required
                                value="<?php echo e(old('generate_date', date('Y-m-d'))); ?>">
                        </div>
                        <?php $__errorArgs = ['generate_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <small class="text-danger"><?php echo e($message); ?></small>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                        <div class="text-center mt-4">
                            <button type="submit" id="submit_btn" class="btn btn-primary btn-custom">
                                Generate ROI
                            </button>
                        </div>
                    </form>
                </div>

            </div>
        </div>


    </div>

</div>
<script>
    document.getElementById('diamondForm').addEventListener('submit', function() {
        const btn = document.getElementById('submit_btn');
        btn.disabled = true;
        btn.innerText = 'Processing...';
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('Admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/omiga_ipl/resources/views/Admin/diamond_generate.blade.php ENDPATH**/ ?>