
<?php $__env->startSection('panel'); ?>
    <div class="row gy-4">
        <div class="col-12">
            <div class="card bl--5 border--danger border-0">
                <div class="card-body">
                    <p class="text--danger fw-bold"><?php echo app('translator')->get(' Attention: Reloadly Account Configuration Alert!'); ?></p>
                    <p class="text--danger"><?php echo app('translator')->get('For proper calculation of exchange rates in this application, your Reloadly account\'s currency must match the site currency.'); ?></p>
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="card overflow-hidden">
                <div class="card-body">
                    <form action="<?php echo e(route('admin.api.config.reloadly.save')); ?>" method="POST">
                        <?php echo csrf_field(); ?>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label><?php echo app('translator')->get('Client ID'); ?></label>
                                    <input class="form-control" name="credentials[client_id]" type="text" value="<?php echo e($apiConfig->credentials->client_id); ?>" required>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label><?php echo app('translator')->get('Client Secret'); ?></label>
                                    <input class="form-control" name="credentials[client_secret]" type="text" value="<?php echo e($apiConfig->credentials->client_secret); ?>" required>
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-group">
                                    <div class="form-check mb-0">
                                        <input class="form-check-input" type="checkbox" name="test_mode" id="testMode" <?php if($apiConfig->test_mode): echo 'checked'; endif; ?>>
                                        <label class="form-check-label" for="testMode">
                                            <?php echo app('translator')->get('Test Mode'); ?>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php $hasPermission = App\Models\Role::hasPermission('admin.api.config.reloadly.save')  ? 1 : 0;
            if($hasPermission == 1): ?>
                            <button class="btn btn--primary h-45 w-100" type="submit"><?php echo app('translator')->get('Submit'); ?></button>
                        <?php endif ?>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="modal" id="helpModal" role="dialog" tabindex="-1">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title"><?php echo app('translator')->get('Need Help'); ?>?</h5>
                    <button class="close" data-bs-dismiss="modal" type="button" aria-label="Close">
                        <i class="las la-times"></i>
                    </button>
                </div>
                <div class="modal-body">
                    <p><?php echo app('translator')->get('For using airtime top-up you need to follow the bellow steps'); ?>:</p>
                    <div class="instruction-wrapper">
                        <p class="instruction">
                            <?php echo app('translator')->get('If you haven\'t registered for a Reloadly account yet, begin by creating one. Visit the registration page'); ?> <a target="_blank" href="https://www.reloadly.com/registration"><?php echo app('translator')->get('here'); ?></a> <?php echo app('translator')->get('to sign up.'); ?>
                        </p>
                        <p class="instruction">
                            <?php echo app('translator')->get('Once registration is complete, sign in to your Reloadly account. Navigate to the developers menu, where you\'ll find your API client ID and API client secret. Copy these credentials.'); ?>
                        </p>
                        <p class="instruction">
                            <?php echo app('translator')->get('Fill out the form with the copied API client ID and API client secret.'); ?>
                        </p>
                        <p class="instruction">
                            <?php echo app('translator')->get('Ensure that your Reloadly account has sufficient funds to support airtime top-up. Refer to their documentation'); ?> <a target="_blank" href="https://developers.reloadly.com/airtime/introduction"><?php echo app('translator')->get('here'); ?></a> <?php echo app('translator')->get(' for more information.'); ?>
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('breadcrumb-plugins'); ?>
    <button type="button" class="btn btn-sm btn-outline--dark" data-bs-toggle="modal" data-bs-target="#helpModal"><i class="la la-question"></i><?php echo app('translator')->get('Help'); ?></button>
<?php $__env->stopPush(); ?>

<?php $__env->startPush('style'); ?>
    <style>
        .instruction-wrapper {
            display: flex;
            flex-direction: column;
            gap: 10px;
            counter-reset: count;
        }

        .instruction::before {
            counter-increment: count;
            content: counters(count, ".") ".";
        }
    </style>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\itrevosbank\core\resources\views/admin/api_config/reloadly.blade.php ENDPATH**/ ?>