<?php if( config('app.locale_switcher_enabled') && count(config('app.locale_active')) > 1 ): ?>
    <?php if( config('app.locale_switcher_style') == 'dropdown' ): ?>

        <div class="language-switcher language-switcher-style-dropdown">
            <div class="btn-group">
                <button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" aria-expanded="false" <?php if( in_array(config('app.locale_switcher_display'), ['flags']) ): ?> title="<?php echo e(config('app.locales')[app()->getLocale()]['native']); ?>" <?php endif; ?>>
                    <?php if( in_array(config('app.locale_switcher_display'), ['names_flags', 'flags']) ): ?>
                        <img src="<?php echo e(asset_url('images','flags/'. app()->getLocale() .'.png')); ?>" class="language-flag" />
                    <?php else: ?>
                        <i class="fa fa-globe language-icon"></i>
                    <?php endif; ?>
                    <?php if( in_array(config('app.locale_switcher_display'), ['names_flags', 'names']) ): ?>
                        <?php if( config('app.locale_switcher_display_name_code') ): ?>
                            <span class="language-name"><?php echo e(explode('-', config('app.locales')[app()->getLocale()]['code'])[1]); ?></span>
                        <?php else: ?>
                            <span class="language-name"><?php echo e(config('app.locales')[app()->getLocale()]['native']); ?></span>
                        <?php endif; ?>
                    <?php endif; ?>
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                    <?php $__currentLoopData = config('app.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getFirstLoop(); ?>
                        <?php if( in_array($lang, config('app.locale_active')) ): ?>
                            <li>
                                <a href="<?php echo e(route('locale.change', $lang)); ?>" <?php if( in_array(config('app.locale_switcher_display'), ['flags']) ): ?> title="<?php echo e($language['native']); ?>" <?php endif; ?> class="clearfix">
                                    <?php if( in_array(config('app.locale_switcher_display'), ['names_flags', 'flags']) ): ?>
                                        <img src="<?php echo e(asset_url('images','flags/'. $lang .'.png')); ?>" class="language-flag" />
                                    <?php endif; ?>
                                    <?php if( in_array(config('app.locale_switcher_display'), ['names_flags', 'names']) ): ?>
                                        <?php if( config('app.locale_switcher_display_name_code') ): ?>
                                            <span class="language-name"><?php echo e(explode('-', $language['code'])[1]); ?></span>
                                        <?php else: ?>
                                            <span class="language-name"><?php echo e($language['native']); ?></span>
                                        <?php endif; ?>
                                    <?php endif; ?>
                                </a>
                            </li>
                        <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getFirstLoop(); ?>
                </ul>
            </div>
        </div>

    <?php else: ?>

        <div class="language-switcher language-switcher-style-inline">
            <ul class="list-inline">
                <?php $__currentLoopData = config('app.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getFirstLoop(); ?>
                    <?php if( in_array($lang, config('app.locale_active')) ): ?>
                        <li <?php if($lang == app()->getLocale()): ?> class="active" <?php endif; ?>>
                            <a href="<?php echo e(route('locale.change', $lang)); ?>" title="<?php echo e($language['native']); ?>">
                                <?php if( in_array(config('app.locale_switcher_display'), ['names_flags', 'flags']) ): ?>
                                    <img src="<?php echo e(asset_url('images','flags/'. $lang .'.png')); ?>" class="language-flag" />
                                <?php endif; ?>
                                <?php if( in_array(config('app.locale_switcher_display'), ['names_flags', 'names']) ): ?>
                                    <?php if( config('app.locale_switcher_display_name_code') ): ?>
                                        <span class="language-name"><?php echo e(explode('-', $language['code'])[1]); ?></span>
                                    <?php else: ?>
                                        <span class="language-name"><?php echo e($language['native']); ?></span>
                                    <?php endif; ?>
                                <?php endif; ?>
                            </a>
                        </li>
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getFirstLoop(); ?>
            </ul>
        </div>

    <?php endif; ?>
<?php endif; ?>
