<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?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\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title', null, []); ?> Editar ONU <?php echo e($onu->serial_number); ?> <?php $__env->endSlot(); ?>
     <?php $__env->slot('breadcrumb', null, []); ?> 
        <a href="<?php echo e(route('onus.index')); ?>" class="hover:text-gray-600 dark:hover:text-gray-300 transition-colors">ONUs</a>
        <svg class="w-3 h-3 mx-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/></svg>
        <a href="<?php echo e(route('onus.show', $onu)); ?>" class="hover:text-gray-600 dark:hover:text-gray-300 font-mono transition-colors"><?php echo e($onu->serial_number); ?></a>
        <svg class="w-3 h-3 mx-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/></svg>
        <span class="text-gray-400">Editar</span>
     <?php $__env->endSlot(); ?>

    <div class="max-w-2xl">
        <div class="mb-6">
            <h1 class="text-xl font-bold text-gray-900 dark:text-white">Editar ONU</h1>
            <p class="text-sm text-gray-400 font-mono mt-0.5"><?php echo e($onu->interface_name); ?></p>
        </div>

        
        <div class="flex items-center gap-3 p-4 rounded-xl mb-5
                    bg-primary-50 dark:bg-primary-900/20
                    border border-primary-200 dark:border-primary-800/30">
            <code class="text-xs font-mono text-primary-700 dark:text-primary-300">
                <?php echo e($onu->port->device->name); ?> &rarr; <?php echo e($onu->interface_name); ?>

            </code>
            <span class="ml-auto">
                <?php if($onu->status === 'authorized'): ?>
                    <span class="badge-green"><span class="w-1 h-1 rounded-full bg-accent-500"></span> Activa</span>
                <?php else: ?>
                    <span class="badge-yellow"><?php echo e($onu->status); ?></span>
                <?php endif; ?>
            </span>
        </div>

        <div class="card">
            <div class="card-body">
                <form method="POST" action="<?php echo e(route('onus.update', $onu)); ?>" class="space-y-5">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('PATCH'); ?>

                    <div>
                        <h3 class="text-xs font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500 mb-3">
                            Datos del Cliente
                        </h3>
                        <div class="grid grid-cols-2 gap-4">
                            <div>
                                <label class="label">Nombre del Cliente</label>
                                <input type="text" name="customer_name"
                                       value="<?php echo e(old('customer_name', $onu->customer_name)); ?>"
                                       class="input">
                            </div>
                            <div>
                                <label class="label">Descripción</label>
                                <input type="text" name="customer_description"
                                       value="<?php echo e(old('customer_description', $onu->customer_description)); ?>"
                                       class="input">
                            </div>
                        </div>
                    </div>

                    <div>
                        <h3 class="text-xs font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500 mb-3">
                            Configuración de Servicio
                        </h3>
                        <div class="grid grid-cols-2 gap-4">
                            <div>
                                <label class="label">VLAN *</label>
                                <input type="number" name="vlan"
                                       value="<?php echo e(old('vlan', $onu->vlan)); ?>" required min="1" max="4094"
                                       class="input font-mono">
                            </div>
                            <div>
                                <label class="label">Service Port *</label>
                                <input type="number" name="service_port"
                                       value="<?php echo e(old('service_port', $onu->service_port)); ?>" required min="1"
                                       class="input font-mono">
                            </div>
                            <div>
                                <label class="label">Perfil de Velocidad *</label>
                                <select name="tcont_profile" required class="input">
                                    <?php $__currentLoopData = $speedProfiles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $profile): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($profile); ?>"
                                            <?php echo e(old('tcont_profile', $onu->tcont_profile) === $profile ? 'selected' : ''); ?>>
                                            <?php echo e($profile); ?>

                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                            <div>
                                <label class="label">Nombre Servicio *</label>
                                <input type="text" name="service_name"
                                       value="<?php echo e(old('service_name', $onu->service_name)); ?>" required
                                       class="input font-mono uppercase">
                            </div>
                        </div>
                    </div>

                    <div class="flex items-center gap-3 pt-2">
                        <button type="submit" class="btn-primary">
                            <svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
                            </svg>
                            Actualizar
                        </button>
                        <a href="<?php echo e(route('onus.show', $onu)); ?>" class="btn-ghost">Cancelar</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\adminolt\resources\views/onus/edit.blade.php ENDPATH**/ ?>