<?php $__env->startSection('mainContent'); ?>
    <?php echo generateBreadcrumb(); ?>

    <section class="admin-visitor-area up_st_admin_visitor white-box">
        <div class="container-fluid p-0">
            <div class="row justify-content-center">
                <div class="col-12">
                    <div class="box_header">
                        <div class="main-title d-flex">
                            <h3><?php echo e(__('setting.Currency')); ?></h3>

                        </div>
                    </div>
                </div>
                <div class="col-12">
                    <div class="">
                        <div class="row">

                            <div class="col-lg-12">
                                <!-- tab-content  -->
                                <div class="tab-content " id="myTabContent">
                                    <!-- General -->
                                    <div class="tab-pane fade show active" id="Activation"
                                         role="tabpanel"
                                         aria-labelledby="Activation-tab">
                                        <div class="main-title mb-25">
                                            <form action="<?php echo e(route('currencies.update_settings')); ?>" method="POST"
                                                  enctype="multipart/form-data">
                                                <?php echo csrf_field(); ?>
                                                <div class="single_system_wrap">
                                                    <div class="row">
                                                        <div class="col-xl-6">
                                                            <div class="primary_input mb-25">
                                                                <label class="primary_input_label"
                                                                       for=""><?php echo e(__('setting.System Default Currency')); ?></label>
                                                                <select class="primary_select mb-25" name="currency_id"
                                                                        id="currency_id">
                                                                    <?php $__currentLoopData = $select_currencies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $currency): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <option value="<?php echo e($currency->id); ?>"
                                                                                <?php if(Settings('currency_id') == $currency->id): ?> selected <?php endif; ?>>
                                                                            <?php echo e($currency->name); ?>

                                                                            - <?php echo e($currency->code); ?>

                                                                            (<?php echo e($currency->symbol); ?>)
                                                                        </option>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="col-xl-6">
                                                            <div class="primary_input mb-25">
                                                                <label class="primary_input_label"
                                                                       for="currency_show"><?php echo e(__('setting.Currency Show At')); ?></label>
                                                                <select class="primary_select mb-25"
                                                                        name="currency_show"
                                                                        id="currency_show">

                                                                    <option value="1"
                                                                            <?php if(Settings('currency_show') == 1): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('setting.Left')); ?>

                                                                    </option>

                                                                    <option value="2"
                                                                            <?php if(Settings('currency_show') == 2): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('setting.Left With Space')); ?>

                                                                    </option>

                                                                    <option value="3"
                                                                            <?php if(Settings('currency_show') == 3): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('setting.Right')); ?>

                                                                    </option>

                                                                    <option value="4"
                                                                            <?php if(Settings('currency_show') == 4): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('setting.Right With Space')); ?>

                                                                    </option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="col-xl-6">
                                                            <div class="primary_input mb-25">
                                                                <label class="primary_input_label"
                                                                       for="currency_seperator"><?php echo e(__('setting.Currency Separator')); ?></label>
                                                                <select class="primary_select mb-25"
                                                                        name="currency_seperator"
                                                                        id="currency_seperator">

                                                                    <option value="1"
                                                                            <?php if(Settings('currency_seperator') == 1): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('setting.Dot')); ?>

                                                                    </option>

                                                                    <option value="2"
                                                                            <?php if(Settings('currency_seperator') == 2): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('setting.Comma')); ?>

                                                                    </option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="col-xl-6">
                                                            <div class="primary_input mb-25">
                                                                <label class="primary_input_label"
                                                                       for="currency_decimal"><?php echo e(__('setting.Currency Decimal')); ?>

                                                                </label>
                                                                <input class="primary_input_field" placeholder="-"
                                                                       type="number" id="currency_decimal"
                                                                       name="currency_decimal"
                                                                       max="5"
                                                                       value="<?php echo e(Settings('currency_decimal')); ?>">
                                                            </div>
                                                        </div>
                                                        <div class="col-xl-6">
                                                            <div class="primary_input mb-25">
                                                                <label class="primary_input_label"
                                                                       for="currency_api_cache_time"><?php echo e(__('setting.API Cache Time (In minutes)')); ?>

                                                                </label>
                                                                <input class="primary_input_field" placeholder="-"
                                                                       type="number" id="currency_api_cache_time"
                                                                       name="currency_api_cache_time"
                                                                       min="0"
                                                                       step="any"
                                                                       value="<?php echo e(Settings('currency_api_cache_time')?Settings('currency_api_cache_time'):1440); ?>">
                                                            </div>
                                                        </div>
                                                        <div class="col-xl-6">
                                                            <div class="primary_input mb-25">
                                                                <label class="primary_input_label"
                                                                       for="hide_multicurrency"><?php echo e(__('setting.Multi Currency')); ?>

                                                                </label>
                                                                <select class="primary_select mb-25"
                                                                        name="hide_multicurrency"
                                                                        id="hide_multicurrency">
                                                                    <option value="1"
                                                                            <?php if(Settings('hide_multicurrency') == 1): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('common.Show')); ?>

                                                                    </option>

                                                                    <option value="0"
                                                                            <?php if(Settings('hide_multicurrency') == 0): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('common.Hide')); ?>

                                                                    </option>
                                                                </select>
                                                            </div>
                                                        </div>

                                                        <div class="col-xl-6">
                                                            <div class="primary_input mb-25">
                                                                <label class="primary_input_label"
                                                                       for="currency_conversion"><?php echo e(__('setting.Currency Conversion')); ?></label>
                                                                <select class="primary_select mb-25"
                                                                        name="currency_conversion"
                                                                        id="currency_conversion">
                                                                    <option value="Manual"
                                                                            <?php if(Settings('currency_conversion') == 'Manual'): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('setting.Manual')); ?>

                                                                    </option>
                                                                    <option value="Fixer"
                                                                            <?php if(Settings('currency_conversion') == 'Fixer'): ?> selected <?php endif; ?>>
                                                                        <?php echo e(__('setting.Fixer')); ?>

                                                                    </option>
                                                                    <option value="Exchangerate"
                                                                            <?php if(Settings('currency_conversion') == 'Exchangerate'): ?> selected <?php endif; ?>>
                                                                        Exchangerate
                                                                    </option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-lg-12 text-center">
                                                    <div class="d-flex justify-content-center pt_20">
                                                        <button type="submit" class="primary-btn semi_large2  fix-gr-bg"
                                                                id="save_button_parent"><i
                                                                class="ti-check"></i><?php echo e(__('common.Save')); ?>

                                                        </button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>


    <section class="admin-visitor-area up_st_admin_visitor mt-4">
        <div class="container-fluid p-0">
            <div class="white-box">
                <div class="row">
                    <div class="col-12">
                        <div class="box_header common_table_header">
                            <div class="main-title d-md-flex">
                                <h3 class="mb-0 mr-30 mb_xs_15px mb_sm_20px"> <?php echo e(__('setting.Currency List')); ?></h3>
                                <?php if(permissionCheck('currency.store')): ?>
                                    <ul class="d-flex">
                                        <li><a class="primary-btn radius_30px   fix-gr-bg "
                                               href="#" onclick="open_add_currency_modal()"><i
                                                    class="ti-plus"></i><?php echo e(__('common.Add New')); ?>

                                                <?php echo e(__('common.Currency')); ?>

                                            </a>
                                        </li>
                                    </ul>
                                <?php endif; ?>
                            </div>

                        </div>
                    </div>
                    <div class="col-lg-12">
                        <div class="QA_section QA_section_heading_custom check_box_table">
                            <div class="QA_table ">
                                <!-- table-responsive -->
                                <div class="">
                                    <table id="lms_table" class="table Crm_table_active3">
                                        <thead>
                                        <tr>
                                            <th scope="col"><?php echo e(__('common.SL')); ?></th>
                                            <th scope="col"><?php echo e(__('common.Name')); ?></th>
                                            <th scope="col"><?php echo e(__('setting.Code')); ?></th>
                                            <th scope="col"><?php echo e(__('setting.Symbol')); ?></th>
                                            <th scope="col"><?php echo e(__('setting.Status')); ?></th>
                                            <th scope="col"><?php echo e(__('setting.Conversion Rate')); ?>

                                                <?php echo e(translatedNumber(1)); ?> <?php echo e($select_currencies->where('id', Settings('currency_id'))?->first()?->code); ?>

                                                = ?
                                            </th>
                                            <th scope="col"><?php echo e(__('common.Action')); ?></th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php
                                            $table_name='currencies';
                                        ?>
                                        <?php $__env->startSection('table'); ?>
                                            <?php echo e($table_name); ?>

                                        <?php $__env->stopSection(); ?>
                                        <?php $__currentLoopData = $currencies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $currency): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <th><?php echo e(translatedNumber($key + 1)); ?></th>
                                                <td><?php echo e($currency->name); ?></td>
                                                <td><?php echo e($currency->code); ?></td>
                                                <td><?php echo e($currency->symbol); ?></td>
                                                <td>
                                                    <?php if (isset($component)) { $__componentOriginala97154f7fc4a6c86651af7d45de58019 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala97154f7fc4a6c86651af7d45de58019 = $attributes; } ?>
<?php $component = App\View\Components\Backend\Status::resolve(['id' => $currency->id,'status' => $currency->status,'route' => 'currencies.status'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('backend.status'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\Backend\Status::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala97154f7fc4a6c86651af7d45de58019)): ?>
<?php $attributes = $__attributesOriginala97154f7fc4a6c86651af7d45de58019; ?>
<?php unset($__attributesOriginala97154f7fc4a6c86651af7d45de58019); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala97154f7fc4a6c86651af7d45de58019)): ?>
<?php $component = $__componentOriginala97154f7fc4a6c86651af7d45de58019; ?>
<?php unset($__componentOriginala97154f7fc4a6c86651af7d45de58019); ?>
<?php endif; ?>
                                                </td>
                                                <td><?php echo e(translatedNumber($currency->conversion_rate)); ?> <?php echo e($currency->symbol); ?></td>
                                                <td>
                                                    <div class="dropdown CRM_dropdown">
                                                        <button class="btn btn-secondary dropdown-toggle" type="button"
                                                                id="dropdownMenu2" data-bs-toggle="dropdown"
                                                                aria-haspopup="true" aria-expanded="false">
                                                            <?php echo e(__('common.Select')); ?>

                                                        </button>
                                                        <div class="dropdown-menu dropdown-menu-right"
                                                             aria-labelledby="dropdownMenu2">
                                                            <?php if(permissionCheck('currencies.edit_modal')): ?>
                                                                <a href="#"
                                                                   class="dropdown-item edit_brand"
                                                                   onclick="edit_currency_modal(<?php echo e($currency->id); ?>)"><?php echo e(__('common.Edit')); ?></a>
                                                            <?php endif; ?>
                                                            <?php if(permissionCheck('currencies.destroy')): ?>
                                                                <a onclick="confirm_modal('<?php echo e(route('currencies.destroy', $currency->id)); ?>');"
                                                                   class="dropdown-item edit_brand"><?php echo e(__('common.Delete')); ?></a>
                                                            <?php endif; ?>
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <div class="modal fade admin-query" id="Item_Edit">

    </div>
    <div class="modal fade admin-query" id="currency_add">
        <div class="modal-dialog modal_800px modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title"><?php echo e(__('common.Add New')); ?> <?php echo e(__('common.Currency')); ?></h4>
                    <button type="button" class="btn-close" data-bs-dismiss="modal">
                        <i class="ti-close "></i>
                    </button>
                </div>

                <div class="modal-body">
                    <form action="<?php echo e(route('currencies.store')); ?>" method="POST" id="currency_addForm">
                        <?php echo csrf_field(); ?>
                        <div class="row">

                            <div class="col-xl-12">
                                <div class="primary_input mb-25">
                                    <label class="primary_input_label" for=""><?php echo e(__('common.Name')); ?> <strong
                                            class="text-danger">*</strong></label>
                                    <input name="name" class="primary_input_field name" placeholder="Dollar"
                                           type="text" required>
                                </div>
                            </div>

                            <div class="col-xl-12">
                                <div class="primary_input mb-25">
                                    <label class="primary_input_label" for=""><?php echo e(__('setting.Code')); ?>

                                        <strong class="text-danger">*</strong></label>
                                    <input name="code" class="primary_input_field name" placeholder="USD"
                                           type="text" required>
                                </div>
                            </div>

                            <div class="col-xl-12">
                                <div class="primary_input mb-25">
                                    <label class="primary_input_label" for=""><?php echo e(__('setting.Symbol')); ?>

                                        <strong class="text-danger">*</strong></label>
                                    <input name="symbol" class="primary_input_field name" placeholder="$"
                                           type="text" required>
                                </div>
                            </div>
                            <div class="col-xl-12">
                                <div class="primary_input mb-25">
                                    <label class="primary_input_label"
                                           for=""><?php echo e(__('setting.Conversion Rate')); ?>

                                        <strong class="text-danger">*</strong></label>
                                    <input name="conversion_rate" class="primary_input_field name" placeholder="1"
                                           type="text" value="1">
                                </div>
                            </div>

                            <div class="col-lg-12 text-center">
                                <div class="d-flex justify-content-center pt_20">
                                    <button type="submit" class="primary-btn semi_large2  fix-gr-bg"
                                            id="save_button_parent"><i class="ti-check"></i><?php echo e(__('common.Save')); ?>

                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

            </div>
        </div>
    </div>

    <input type="hidden" name="currency_edit" class="currency_edit" value="<?php echo e(route('currencies.edit_modal')); ?>">

    <?php echo $__env->make('backend.partials.delete_modal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('scripts'); ?>
    <script src="<?php echo e(asset('public/backend/js/currency.js')); ?>"></script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('backend.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/minialms/card.minialms.com/Modules/Setting/Resources/views/currencies/index.blade.php ENDPATH**/ ?>