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

<?php $__env->startSection('breadcrumb'); ?>
    <div class="section-header-breadcrumb">
        <div class="breadcrumb-item"><a href="<?php echo e(route('admin.dashboard')); ?>">Dashboard</a></div>
        <div class="breadcrumb-item">Language Manager</div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('main-content'); ?>
    <div class="row mb-4">
        <div class="col-lg-4 col-md-6 col-sm-6 col-12">
            <div class="card card-statistic-1">
                <div class="card-icon bg-primary">
                    <i class="fas fa-language"></i>
                </div>
                <div class="card-wrap">
                    <div class="card-header">
                        <h4>Total Languages</h4>
                    </div>
                    <div class="card-body">
                        <?php echo e(count($languages)); ?>

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

    <div class="card">
        <div class="card-header">
            <h4>System Languages</h4>
            <div class="card-header-action">
                <a href="<?php echo e(route('admin.languages.create')); ?>" class="btn btn-primary">
                    <i class="fas fa-plus"></i> New Language
                </a>
            </div>
        </div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>Language</th>
                            <th>Code</th>
                            <th>Native Name</th>
                            <th>Flag</th>
                            <th>Default</th>
                            <th class="text-right">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $code => $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><strong><?php echo e($lang['name']); ?></strong></td>
                                <td><code><?php echo e($code); ?></code></td>
                                <td><?php echo e($lang['native']); ?></td>
                                <td style="font-size: 1.5rem;"><?php echo e($lang['flag']); ?></td>
                                <td>
                                    <?php if($code === 'en'): ?>
                                        <span class="badge badge-success">System Default</span>
                                    <?php else: ?>
                                        <span class="text-muted">—</span>
                                    <?php endif; ?>
                                </td>
                                <td class="text-right">
                                    <a href="<?php echo e(route('admin.languages.translations.edit', ['locale' => $code])); ?>"
                                        class="btn btn-sm btn-info" title="Manage Translations">
                                        <i class="fas fa-edit"></i> Translate Keys
                                    </a>
                                    <?php if($code !== 'en'): ?>
                                        <form action="<?php echo e(route('admin.languages.destroy', ['locale' => $code])); ?>"
                                            method="POST" class="d-inline"
                                            onsubmit="return confirm('Are you sure you want to delete this language? This will delete the directory resources/lang/<?php echo e($code); ?> and all its translation files permanently.');">
                                            <?php echo csrf_field(); ?>
                                            <?php echo method_field('DELETE'); ?>
                                            <button class="btn btn-sm btn-outline-danger" type="submit" title="Delete Language">
                                                <i class="fas fa-trash-alt"></i>
                                            </button>
                                        </form>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/mahmudul/Codecanyone/edu_ex_full/Eduex_laravel/resources/views/admin/languages/index.blade.php ENDPATH**/ ?>