<?php $__env->startSection('title', 'Configure ' . $videoPlugin->name); ?>
<?php $__env->startSection('content'); ?>
<div class="action-bar">
    <a href="<?php echo e(route('admin.video-plugins.index')); ?>" class="btn btn-dark">&larr; Back</a>
    <span>Configure: <strong><?php echo e($videoPlugin->name); ?></strong></span>
</div>
<div class="card">
    <form action="<?php echo e(route('admin.video-plugins.update', $videoPlugin)); ?>" method="POST">
        <?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>

        <div class="form-group">
            <div style="display:flex;align-items:center;gap:10px;margin-bottom:15px">
                <label style="margin:0">
                    <input type="checkbox" name="is_active" value="1" <?php echo e($videoPlugin->is_active ? 'checked' : ''); ?>>
                    Active
                </label>
                <small class="text-muted">Enable this plugin on the frontend</small>
            </div>
        </div>

        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(count($fields)): ?>
        <h3 style="margin-bottom:15px;color:var(--text-muted);font-size:0.9rem;text-transform:uppercase;letter-spacing:1px">
            Plugin Configuration
        </h3>

        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
        <div class="form-group">
            <label for="config_<?php echo e($field['key']); ?>">
                <?php echo e($field['label']); ?>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!empty($field['required'])): ?><span style="color:#e74c3c">*</span><?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </label>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($field['type'] ?? 'text') === 'textarea'): ?>
                <textarea name="config[<?php echo e($field['key']); ?>]" id="config_<?php echo e($field['key']); ?>"
                    class="form-control" rows="3"
                    <?php echo e(!empty($field['required']) ? 'required' : ''); ?>><?php echo e(old('config.' . $field['key'], $videoPlugin->config[$field['key']] ?? '')); ?></textarea>
            <?php elseif(($field['type'] ?? 'text') === 'select'): ?>
                <select name="config[<?php echo e($field['key']); ?>]" id="config_<?php echo e($field['key']); ?>" class="form-control"
                    <?php echo e(!empty($field['required']) ? 'required' : ''); ?>>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $field['options'] ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <option value="<?php echo e($value); ?>" <?php echo e((old('config.' . $field['key'], $videoPlugin->config[$field['key']] ?? '') == $value) ? 'selected' : ''); ?>><?php echo e($label); ?></option>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                </select>
            <?php elseif(($field['type'] ?? 'text') === 'password'): ?>
                <input type="password" name="config[<?php echo e($field['key']); ?>]" id="config_<?php echo e($field['key']); ?>"
                    class="form-control" value="<?php echo e(old('config.' . $field['key'], $videoPlugin->config[$field['key']] ?? '')); ?>"
                    <?php echo e(!empty($field['required']) ? 'required' : ''); ?>>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($videoPlugin->config[$field['key']] ?? false): ?>
                <small class="text-muted">Leave empty to keep current value</small>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            <?php else: ?>
                <input type="text" name="config[<?php echo e($field['key']); ?>]" id="config_<?php echo e($field['key']); ?>"
                    class="form-control" value="<?php echo e(old('config.' . $field['key'], $videoPlugin->config[$field['key']] ?? '')); ?>"
                    <?php echo e(!empty($field['required']) ? 'required' : ''); ?>>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
        <?php else: ?>
        <p class="text-muted">This plugin requires no configuration.</p>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

        <div class="form-group" style="margin-top:20px">
            <button type="submit" class="btn btn-primary">Save Configuration</button>
        </div>
    </form>
</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/edit.blade.php ENDPATH**/ ?>