<?php $__env->startSection('title', 'Settings'); ?>

<?php $__env->startSection('content'); ?>
<!-- Content Header (Page header) -->
<section class="content-header">
    <div class="container-fluid">
        <div class="row mb-2">
            <div class="col-sm-6 offse">
                <h1>Setting - <small>Credintial</small></h1>
            </div>
            <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                    <li class="breadcrumb-item"><a href="<?php echo e(routeHelper('dashboard')); ?>">Home</a></li>
                    <li class="breadcrumb-item active">SMS | Mail | Login | Register Configureation</li>
                </ol>
            </div>
        </div>
    </div><!-- /.container-fluid -->
</section>



<section class="content">
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">COURIER Configuration</h3>
        </div>
        <div class="card-body">
            <form id="courier_config" action="<?php echo e(routeHelper('setting')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <?php echo method_field('PUT'); ?>
                <div class="row">
                    <?php
                        $couriers = [
                            'STEEDFAST' => [
                                'type' => 12,
                                'name' => 'STEEDFAST',
                                'url' => 'https://www.steadfast.com.bd/',
                                'status_key' => 'STEEDFAST_STATUS',
                                'is_sandbox' => 'STEEDFAST_IS_SANDBOX',
                                'api_key' => 'STEEDFAST_API_KEY',
                                'secret_key' => 'STEEDFAST_API_SECRET_KEY'
                            ],
                            'PATHO' => [
                                'type' => 16,
                                'name' => 'Patho',
                                'url' => 'https://merchant.pathao.com/',
                                'status_key' => 'PATHO_STATUS',
                                'is_sandbox' => 'PATHO_IS_SANDBOX',
                                'api_key' => 'PATHO_API_KEY',
                                'secret_key' => 'PATHO_API_SECRET_KEY',
                                'client_email' => 'PATHO_CLIENT_EMAIL',
                                'client_password' => 'PATHO_CLIENT_PASSWORD'
                            ],
                            'REDX' => [
                                'type' => 17,
                                'name' => 'Redx',
                                'url' => 'https://www.redx.com.bd/',
                                'status_key' => 'REDX_STATUS',
                                'is_sandbox' => 'REDX_IS_SANDBOX',
                                'token' => 'REDX_TOKEN',
                            ]
                        ];
                    ?>
                    
                    <?php $__currentLoopData = $couriers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $courier): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="col-sm-4">
                            <div class="card card-success">
                                <div class="card-header">
                                    <h3 class="card-title"><?php echo e($courier['name']); ?> Courier Configuration</h3>
                                </div>
                                <div class="card-body">
                                    <div class="form-group col-md-12">
                                        <input type="hidden" name="type[<?php echo e($key); ?>]" value="<?php echo e($courier['type']); ?>">
                                        <ul>
                                            <li>
                                                <small style="color:red;">
                                                    Get API from: 
                                                    <a href="<?php echo e($courier['url']); ?>" target="_blank" rel="noopener noreferrer"><?php echo e($courier['url']); ?></a>
                                                </small>
                                            </li>
                                            <li>
                                                <?php if(isset($courier['status_key'])): ?>
                                                    <label for="<?php echo e($courier['status_key']); ?>" class="text-capitalize">API V1 STATUS</label>
                                                    <select name="<?php echo e($courier['status_key']); ?>" id="<?php echo e($courier['status_key']); ?>">
                                                        <option value="1" <?php echo e((setting($courier['status_key']) ?? 0) == 1 ? 'selected' : ''); ?>>ON</option>
                                                        <option value="0" <?php echo e((setting($courier['status_key']) ?? 0) == 0 ? 'selected' : ''); ?>>OFF</option>
                                                    </select>
                                                <?php endif; ?>
                                                <?php if(isset($courier['is_sandbox'])): ?>
                                                    <label for="<?php echo e($courier['is_sandbox']); ?>" class="text-capitalize">Is Sandbox</label>
                                                    <select name="<?php echo e($courier['is_sandbox']); ?>" id="<?php echo e($courier['is_sandbox']); ?>">
                                                        <option value="1" <?php echo e((setting($courier['is_sandbox']) ?? 0) == 1 ? 'selected' : ''); ?>>ON</option>
                                                        <option value="0" <?php echo e((setting($courier['is_sandbox']) ?? 0) == 0 ? 'selected' : ''); ?>>OFF</option>
                                                    </select>
                                                <?php endif; ?>
                                            </li>
                                            <li>
                                                <?php if(isset($courier['api_key'])): ?>
                                                    <label for="<?php echo e($courier['api_key']); ?>" class="text-capitalize">API KEY</label>
                                                    <input type="text" name="<?php echo e($courier['api_key']); ?>" id="<?php echo e($courier['api_key']); ?>" value="<?php echo e(setting($courier['api_key']) ?? ''); ?>">
                                                <?php endif; ?>
                                            </li>
                                            <li>
                                                <?php if(isset($courier['secret_key'])): ?>
                                                    <label for="<?php echo e($courier['secret_key']); ?>" class="text-capitalize">API SECRET</label>
                                                    <input type="text" name="<?php echo e($courier['secret_key']); ?>" id="<?php echo e($courier['secret_key']); ?>" value="<?php echo e(setting($courier['secret_key']) ?? ''); ?>">
                                                <?php endif; ?>
                                            </li>
                                            <?php if(isset($courier['client_email'])): ?>
                                                <li>
                                                    <label for="<?php echo e($courier['client_email']); ?>" class="text-capitalize">Client Email</label>
                                                    <input type="email" name="<?php echo e($courier['client_email']); ?>" id="<?php echo e($courier['client_email']); ?>" value="<?php echo e(setting($courier['client_email']) ?? ''); ?>">
                                                </li>
                                            <?php endif; ?>
                                            <?php if(isset($courier['client_password'])): ?>
                                                <li>
                                                    <label for="<?php echo e($courier['client_password']); ?>" class="text-capitalize">Client Password</label>
                                                    <input type="password" name="<?php echo e($courier['client_password']); ?>" id="<?php echo e($courier['client_password']); ?>" value="<?php echo e(setting($courier['client_password']) ?? ''); ?>">
                                                </li>
                                            <?php endif; ?>
                                            <?php if(isset($courier['token'])): ?>
                                                <li>
                                                    <label for="<?php echo e($courier['token']); ?>" class="text-capitalize">Token</label>
                                                    <input type="text" name="<?php echo e($courier['token']); ?>" id="<?php echo e($courier['token']); ?>" value="<?php echo e(setting($courier['token']) ?? ''); ?>">
                                                </li>
                                            <?php endif; ?>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
                
                <div class="card-footer">
                    <button type="submit" class="btn btn-success float-right">
                        <i class="fas fa-arrow-circle-up"></i> Update
                    </button>
                </div>
            </form>
        </div>
    </div>
</section>


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

<?php $__env->startPush('css'); ?>
    <style>
        form ul li input[type="text"],
        form ul li input[type="email"],
        form ul li input[type="password"]{
            border: 1px solid #ccc;
            margin-top: .5rem;
            margin-right: .5rem;
            padding: .4rem;
        }

        form select{
            margin: .5rem;
        }
    </style>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layouts.admin.e-commerce.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/apleusbj/shopping.apleefix.com/resources/views/admin/e-commerce/setting/courierIndex.blade.php ENDPATH**/ ?>