

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

    <div data-aos="fade-up" data-aos-duration="1000" class="p-sm-30 p-15">
            <div class="row rg-20">
                <div class="col-xl-3">
                    <?php echo $__env->make('admin.setting.partials.general-sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                </div>
                <div class="col-xl-9">
                    <div class="p-sm-25 p-15 bd-one bd-c-stroke bd-ra-10 bg-white">
                        <h4 class="fs-18 fw-600 lh-22 text-title-black pb-25"><?php echo e($pageTitle); ?></h4>
                        <div class="pb-25">
                            <h5 class="fs-16 fw-600 lh-22 text-title-black pb-10"><?php echo e(__('Instructions')); ?>: </h5>
                            <p class="fs-12 fw-400 lh-22 text-para-text pb-10"><?php echo e(__('You need to click on')); ?>

                                <strong><?php echo e(__(' "Storage Link"')); ?></strong> <?php echo e(__(' button, after change ')); ?>

                                <strong><?php echo e(__('"Storage Driver"')); ?></strong></p>

                            <a href="<?php echo e(route('admin.setting.storage.link')); ?>" class="py-10 px-26 bg-main-color bd-one bd-c-main-color bd-ra-8 fs-15 fw-600 lh-25 text-white d-inline-block"><?php echo e(__(' Storage
                                    Link')); ?></a>
                        </div>

                        <form class="ajax" action="<?php echo e(route('admin.setting.storage.update')); ?>" method="POST"
                              enctype="multipart/form-data" data-handler="settingCommonHandler">
                            <?php echo csrf_field(); ?>
                            <div class="pb-25">
                                <label class="zForm-label"><?php echo e(__('Storage Driver')); ?> <span class="text-danger">*</span></label>

                                <select name="STORAGE_DRIVER" id="storage_driver" class="form-select form-control" required>
                                    <option
                                        value="<?php echo e(STORAGE_DRIVER_PUBLIC); ?>" <?php echo e(env('STORAGE_DRIVER') == STORAGE_DRIVER_PUBLIC ?  'selected':''); ?>><?php echo e(__('Public')); ?></option>
                                    <option
                                        value="<?php echo e(STORAGE_DRIVER_AWS); ?>" <?php echo e(env('STORAGE_DRIVER') == STORAGE_DRIVER_AWS ?  'selected':''); ?>><?php echo e(__('AWS')); ?></option>
                                    <option
                                        value="<?php echo e(STORAGE_DRIVER_WASABI); ?>" <?php echo e(env('STORAGE_DRIVER') == STORAGE_DRIVER_WASABI ?  'selected':''); ?>><?php echo e(__('Wasabi')); ?></option>
                                    <option
                                        value="<?php echo e(STORAGE_DRIVER_VULTR); ?>" <?php echo e(env('STORAGE_DRIVER') == STORAGE_DRIVER_VULTR ?  'selected':''); ?>><?php echo e(__('Vultr')); ?></option>

                                </select>

                            </div>
                            <div class="d-none storage-driver" id="aws">
                                <div class="row rg-24 pb-25">
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('AWS Access Key ID')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="AWS_ACCESS_KEY_ID" value="<?php echo e(env('AWS_ACCESS_KEY_ID')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('AWS Secret Access Key')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="AWS_SECRET_ACCESS_KEY" value="<?php echo e(env('AWS_SECRET_ACCESS_KEY')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('AWS Default Region')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="AWS_DEFAULT_REGION" value="<?php echo e(env('AWS_DEFAULT_REGION')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('AWS Bucket')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="AWS_BUCKET" value="<?php echo e(env('AWS_BUCKET')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('AWS URL')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="AWS_URL" value="<?php echo e(env('AWS_URL')); ?>" class="zForm-control">
                                    </div>
                                </div>
                            </div>
                            <div class="d-none storage-driver" id="wasabi">
                                <div class="row rg-24 pb-25">
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('WAS Access Key ID')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="WASABI_ACCESS_KEY_ID" value="<?php echo e(env('WASABI_ACCESS_KEY_ID')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('WAS Secret Access Key')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="WASABI_SECRET_ACCESS_KEY" value="<?php echo e(env('WASABI_SECRET_ACCESS_KEY')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('WAS Default Region')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="WASABI_DEFAULT_REGION" value="<?php echo e(env('WASABI_DEFAULT_REGION')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('WAS Bucket')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="WASABI_BUCKET" value="<?php echo e(env('WASABI_BUCKET')); ?>" class="zForm-control">
                                    </div>
                                </div>
                            </div>
                            <div class="d-none storage-driver" id="vultr">
                                <div class="row rg-24 pb-25">
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('VULTR Access Key')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="VULTR_ACCESS_KEY_ID" value="<?php echo e(env('VULTR_ACCESS_KEY')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('VULTR Secret Key')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="VULTR_SECRET_ACCESS_KEY" value="<?php echo e(env('VULTR_SECRET_KEY')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('VULTR Region')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="VULTR_DEFAULT_REGION" value="<?php echo e(env('VULTR_REGION')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('VULTR Bucket')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="VULTR_BUCKET" value="<?php echo e(env('VULTR_BUCKET')); ?>" class="zForm-control">
                                    </div>
                                </div>
                            </div>

                            <div class="d-none storage-driver" id="do">
                                <div class="row rg-24 pb-25">
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="col-lg-3"><?php echo e(__('DO Access Key ID')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="DO_ACCESS_KEY_ID" value="<?php echo e(env('DO_ACCESS_KEY_ID')); ?>" class="form-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('DO Secret Access Key')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="DO_SECRET_ACCESS_KEY" value="<?php echo e(env('DO_SECRET_ACCESS_KEY')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('DO Default Region')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="DO_DEFAULT_REGION" value="<?php echo e(env('DO_DEFAULT_REGION')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('DO Bucket')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="DO_BUCKET" value="<?php echo e(env('DO_BUCKET')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('DO Folder')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="DO_FOLDER" value="<?php echo e(env('DO_FOLDER')); ?>" class="zForm-control">
                                    </div>
                                    <div class="col-lg-4 col-sm-6">
                                        <label class="zForm-label"><?php echo e(__('DO CDN ID')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="DO_CDN_ID" value="<?php echo e(env('DO_CDN_ID')); ?>" class="zForm-control">
                                    </div>
                                </div>
                            </div>
                            <button type="submit" class="m-0 fs-15 border-0 fw-500 lh-25 text-white py-10 px-26 bg-main-color bd-ra-12"><?php echo e(__('Update')); ?></button>
                        </form>
                    </div>
                </div>
            </div>

    </div>
    <!-- Page content area end -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('script'); ?>
    <script src="<?php echo e(asset('admin/js/custom/storage-settings.js')); ?>"></script>
    <script>
            $(function () {
                var value = $('#storage_driver').val();
                storage(value)
            })

            $('#storage_driver').on('change', function () {
                var value = this.value
                storage(value)
            })

            function storage(STORAGE_DRIVER) {
                if (STORAGE_DRIVER == 'public') {
                    $('#aws').addClass('d-none');
                    $('#wasabi').addClass('d-none');
                    $('#vultr').addClass('d-none');
                    $('#do').addClass('d-none');
                } else if (STORAGE_DRIVER == 's3') {
                    $('#aws').removeClass('d-none');
                    $('#wasabi').addClass('d-none');
                    $('#vultr').addClass('d-none');
                    $('#do').addClass('d-none');
                } else if (STORAGE_DRIVER == 'wasabi') {
                    $('#aws').addClass('d-none');
                    $('#wasabi').removeClass('d-none');
                    $('#vultr').addClass('d-none');
                    $('#do').addClass('d-none');
                } else if (STORAGE_DRIVER == 'vultr') {
                    $('#aws').addClass('d-none');
                    $('#wasabi').addClass('d-none');
                    $('#vultr').removeClass('d-none');
                    $('#do').addClass('d-none');
                }
            }
        </script>
<?php $__env->stopPush(); ?>



<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home6/metawebd/metagrievance.metawebdevelopment.cloud/resources/views/admin/setting/general_settings/storage-setting.blade.php ENDPATH**/ ?>