
<?php $__env->startSection('setting-title'); ?>
    <?php echo e(__('Site Settings')); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('title'); ?>
    <?php echo e(__('Site Settings')); ?>

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

    <?php $__currentLoopData = config('setting'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $section => $fields): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

        <?php if ($__env->exists('backend.setting.site_setting.include.__'. $section)) echo $__env->make('backend.setting.site_setting.include.__'. $section, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('single-script'); ?>
    <script>
    (function($) {
        'use strict';
        var currencyType ='<?php echo e(setting('site_currency_type','global')); ?>'

        function siteCurrency(currencyType) {
            var currencyData = JSON.parse(<?php echo json_encode(getJsonData('currency'), 15, 512) ?>);
            $('.site-currency-'+currencyType).select2({
                data: currencyData[currencyType]
            });
        }

        $('.site-currency-type').on('change',function () {
               currencyType = $(this).val();
               currencyShow(currencyType)
        });

        function currencyShow(currencyType){
            if (currencyType === 'fiat'){
                $('.currency-fiat').removeClass('d-none')
                $('.currency-crypto').addClass('d-none')

                $('.site-currency-fiat').attr('name','site_currency');
                $('.site-currency-crypto').attr('name','');

            }else {
                $('.currency-crypto').removeClass('d-none')
                $('.currency-fiat').addClass('d-none')

                $('.site-currency-crypto').attr('name','site_currency');
                $('.site-currency-fiat').attr('name','');
            }
        }

        siteCurrency('fiat')
        siteCurrency('crypto')
        currencyShow(currencyType)

        var timezoneData = JSON.parse(<?php echo json_encode(getJsonData('timeZone'), 15, 512) ?>);
        const convertedData = timezoneData.map(item => ({
            id: item.name,
            text: `${item.description} (${item.name})`
        }));

        $('.site-timezone').select2({
            data: convertedData
        });


    })(jQuery);
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('backend.setting.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/charslib/aogelon.com/resources/views/backend/setting/site_setting/index.blade.php ENDPATH**/ ?>