<?php $__env->startSection('content'); ?>
    <div class="flex flex-col xl:flex-row gap-6 items-start">

        
        <div class="w-full xl:max-w-sm shrink-0">
            <div class="bg-white border border-primary-100 rounded-2xl shadow-soft overflow-hidden">

                
                <div class="bg-gradient-to-br from-primary-900 to-primary-700 px-6 py-5 text-center">
                    <h5 class="text-white font-semibold text-base"><?php echo app('translator')->get('You are applying for a Loan'); ?></h5>
                    <p class="text-accent-300 text-sm mt-1 font-medium">
                        (<?php echo app('translator')->get('Be Sure Before Confirm'); ?>)
                    </p>
                </div>

                
                <div class="divide-y divide-primary-100">

                    <div class="flex items-center justify-between px-5 py-3.5 hover:bg-primary-50 transition-colors duration-150">
                        <span class="text-sm font-bold text-primary-900"><?php echo app('translator')->get($plan->name); ?></span>
                        <span class="text-xs text-primary-500 font-medium"><?php echo app('translator')->get('Plan Name'); ?></span>
                    </div>

                    <div class="flex items-center justify-between px-5 py-3.5 hover:bg-primary-50 transition-colors duration-150">
                        <span class="text-sm font-bold text-primary-900"><?php echo e($general->cur_sym . showAmount($amount)); ?></span>
                        <span class="text-xs text-primary-500 font-medium"><?php echo app('translator')->get('Loan Amount'); ?></span>
                    </div>

                    <div class="flex items-center justify-between px-5 py-3.5 hover:bg-primary-50 transition-colors duration-150">
                        <span class="text-sm font-bold text-primary-900"><?php echo e($plan->total_installment); ?></span>
                        <span class="text-xs text-primary-500 font-medium"><?php echo app('translator')->get('Total Installments'); ?></span>
                    </div>

                    <?php $per_installment = $amount * $plan->per_installment / 100; ?>

                    <div class="flex items-center justify-between px-5 py-3.5 hover:bg-primary-50 transition-colors duration-150">
                        <span class="text-sm font-bold text-secondary-500"><?php echo e($general->cur_sym . showAmount($per_installment)); ?></span>
                        <span class="text-xs text-primary-500 font-medium"><?php echo app('translator')->get('Per Installment'); ?></span>
                    </div>

                    
                    <div class="flex items-center justify-between px-5 py-3.5 bg-accent-50 hover:bg-accent-100 transition-colors duration-150">
                        <span class="text-sm font-bold text-accent-700">
                            <?php echo e($general->cur_sym . showAmount($per_installment * $plan->total_installment)); ?>

                        </span>
                        <span class="text-xs font-semibold text-accent-600"><?php echo app('translator')->get('You Need To Pay'); ?></span>
                    </div>

                </div>

                
                <?php if($plan->delay_value && getAmount($plan->delay_charge)): ?>
                    <div class="mx-4 mb-4 mt-3 flex items-start gap-2.5 p-3.5 bg-amber-50 border border-amber-200 rounded-xl">
                        <i class="las la-clock text-amber-500 text-base shrink-0 mt-0.5"></i>
                        <p class="text-xs text-amber-700 leading-relaxed">
                            <?php echo app('translator')->get('If an installment is delayed for'); ?>
                            <span class="font-bold"><?php echo e($plan->delay_value); ?></span>
                            <?php echo app('translator')->get('or more days then, an amount of'); ?>
                            <span class="font-bold"><?php echo e($general->cur_sym . showAmount($plan->delay_charge)); ?></span>
                            <?php echo app('translator')->get('will be applied for each day.'); ?>
                        </p>
                    </div>
                <?php endif; ?>

            </div>
        </div>

        
        <div class="flex-1 min-w-0">
            <div class="bg-white border border-primary-100 rounded-2xl shadow-soft overflow-hidden">

                
                <div class="bg-gradient-to-br from-primary-900 to-primary-700 px-6 py-5">
                    <h5 class="text-white font-semibold text-base"><?php echo app('translator')->get('Application Form'); ?></h5>
                    <p class="text-primary-200 text-xs mt-1"><?php echo app('translator')->get('Fill in the details below to complete your loan application'); ?></p>
                </div>

                <div class="px-6 py-6">
                    <form action="<?php echo e(route('user.loan.apply.confirm')); ?>" method="post" enctype="multipart/form-data" class="flex flex-col gap-5">
                        <?php echo csrf_field(); ?>

                        
                        <?php if($plan->instruction): ?>
                            <div class="flex items-start gap-3 p-4 bg-primary-50 border border-primary-200 rounded-xl">
                                <i class="las la-info-circle text-primary-500 text-base shrink-0 mt-0.5"></i>
                                <div class="text-sm text-primary-600 leading-relaxed">
                                    <?php echo $plan->instruction ?>
                                </div>
                            </div>
                        <?php endif; ?>

                        
                        <?php if (isset($component)) { $__componentOriginale40beaa5cbfa24869bd0b7ba4d9f41184a3f12f0 = $component; } ?>
<?php $component = App\View\Components\ViserForm::resolve(['identifier' => 'id','identifierValue' => ''.e($plan->form_id).''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('viser-form'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\ViserForm::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale40beaa5cbfa24869bd0b7ba4d9f41184a3f12f0)): ?>
<?php $component = $__componentOriginale40beaa5cbfa24869bd0b7ba4d9f41184a3f12f0; ?>
<?php unset($__componentOriginale40beaa5cbfa24869bd0b7ba4d9f41184a3f12f0); ?>
<?php endif; ?>

                        
                        <button type="submit"
                                class="w-full mt-1 py-3 rounded-xl text-sm font-semibold bg-primary-900 text-white hover:bg-primary-700 transition-all duration-200 shadow-glow">
                            <?php echo app('translator')->get('Apply for Loan'); ?>
                        </button>

                    </form>
                </div>

            </div>
        </div>

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

<?php $__env->startPush('bottom-menu'); ?>
    <div class="w-full order-4 lg:order-3">
        <div class="flex items-center gap-2 md:gap-3">

            <a href="<?php echo e(route('user.loan.plans')); ?>"
               class="px-5 py-2.5 rounded-xl text-sm font-semibold bg-primary-900 text-white border-2 border-primary-900 hover:bg-primary-700 hover:border-primary-700 transition-all duration-200 shadow-glow">
                <?php echo app('translator')->get('Loan Plans'); ?>
            </a>

            <a href="<?php echo e(route('user.loan.list')); ?>"
               class="px-5 py-2.5 rounded-xl text-sm font-semibold border-2 border-primary-700 text-primary-700 hover:bg-primary-700 hover:text-white transition-all duration-200">
                <?php echo app('translator')->get('My Loan List'); ?>
            </a>

        </div>
    </div>
<?php $__env->stopPush(); ?>
<?php echo $__env->make($activeTemplate . 'layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\itrevosbank\core\resources\views/templates/crystal_sky/user/loan/form.blade.php ENDPATH**/ ?>