<?php $__env->startSection('title', 'Video Plugins'); ?>
<?php $__env->startSection('content'); ?>
<div class="action-bar">
    <span><?php echo e($plugins->count()); ?> video plugin(s)</span>
</div>

<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('success')): ?>
    <div class="alert alert-success"><?php echo e(session('success')); ?></div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('error')): ?>
    <div class="alert alert-error"><?php echo e(session('error')); ?></div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

<div class="card">
    <table>
        <tr>
            <th>Plugin</th>
            <th>Version</th>
            <th>Status</th>
            <th>Configured</th>
            <th>Actions</th>
        </tr>
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $plugins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plugin): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
        <?php $resolved = $plugin->resolvePlugin(); ?>
        <tr>
            <td>
                <strong><?php echo e($plugin->name); ?></strong>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($plugin->author): ?><br><small class="text-muted">by <?php echo e($plugin->author); ?></small><?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($plugin->description): ?><br><small class="text-muted"><?php echo e($plugin->description); ?></small><?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </td>
            <td>v<?php echo e($plugin->version); ?></td>
            <td>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($plugin->is_installed && $plugin->is_active): ?>
                    <span style="color:#6fcf97">Active</span>
                <?php elseif($plugin->is_installed): ?>
                    <span style="color:#f0c040">Inactive</span>
                <?php else: ?>
                    <span style="color:#e74c3c">Not Installed</span>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </td>
            <td>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($resolved && $resolved->isConfigured($plugin)): ?>
                    <span style="color:#6fcf97">&#10003;</span>
                <?php else: ?>
                    <span style="color:#e74c3c">&#10007;</span>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </td>
            <td class="inline-flex">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($plugin->is_installed): ?>
                    <a href="<?php echo e(route('admin.video-plugins.edit', $plugin)); ?>" class="btn btn-primary btn-sm">Configure</a>
                    <a href="<?php echo e(route('admin.video-plugins.toggle', $plugin)); ?>" class="btn btn-sm <?php echo e($plugin->is_active ? 'btn-dark' : 'btn-primary'); ?>"
                       onclick="return confirm('<?php echo e($plugin->is_active ? 'Deactivate' : 'Activate'); ?> this plugin?')">
                        <?php echo e($plugin->is_active ? 'Deactivate' : 'Activate'); ?>

                    </a>
                    <a href="<?php echo e(route('admin.video-plugins.uninstall', $plugin->code)); ?>" class="btn btn-danger btn-sm"
                       onclick="return confirm('Uninstall this plugin?')">Uninstall</a>
                <?php else: ?>
                    <a href="<?php echo e(route('admin.video-plugins.install', $plugin->code)); ?>" class="btn btn-primary btn-sm">Install</a>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </td>
        </tr>
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
        <tr>
            <td colspan="5">
                <div class="empty-state">
                    <p>No video plugins installed.</p>
                    <p style="font-size:0.85rem;color:var(--text-muted);margin-top:8px;">
                        Available plugins: YouTube Video, Vimeo Video, HTML5 Video Player
                    </p>
                    <div style="margin-top:15px;display:flex;gap:10px;justify-content:center;flex-wrap:wrap">
                        <a href="<?php echo e(route('admin.video-plugins.install', 'youtube')); ?>" class="btn btn-primary btn-sm">Install YouTube</a>
                        <a href="<?php echo e(route('admin.video-plugins.install', 'vimeo')); ?>" class="btn btn-primary btn-sm">Install Vimeo</a>
                        <a href="<?php echo e(route('admin.video-plugins.install', 'video_player')); ?>" class="btn btn-primary btn-sm">Install Video Player</a>
                    </div>
                </div>
            </td>
        </tr>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
    </table>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\diag\autodiag\resources\views/admin/video-plugins/index.blade.php ENDPATH**/ ?>