
<?php $__env->startSection('title','Edit Router — BlueBando v3'); ?>

<?php $__env->startSection('content'); ?>
  <h1 style="margin:0 0 12px">Edit Router</h1>

  <div class="card full">
    <form method="POST" action="<?php echo e(route('routers.update',$router)); ?>">
      <?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>
      <div style="display:grid;grid-template-columns:repeat(2,1fr);gap:14px">

      <div>
  <label class="label">Prefer VPN when available</label>
  <select class="input" name="prefer_vpn">
    <option value="1" <?php if($router->prefer_vpn): echo 'selected'; endif; ?>>Yes</option>
    <option value="0" <?php if(!$router->prefer_vpn): echo 'selected'; endif; ?>>No</option>
  </select>
  <div class="muted" style="font-size:12px;margin-top:4px">
    When enabled and a VPN IP exists, the system will connect via VPN.
  </div>
</div>

        <div>
          <label class="label">Name</label>
          <input class="input" name="name" value="<?php echo e($router->name); ?>" required>
        </div>
        <div>
          <label class="label">Site</label>
          <input class="input" name="site" value="<?php echo e($router->site); ?>">
        </div>
        <div>
          <label class="label">Host</label>
          <input class="input" name="host" value="<?php echo e($router->host); ?>" required>
        </div>
        <div>
          <label class="label">API Port</label>
          <input class="input" type="number" name="api_port" value="<?php echo e($router->api_port); ?>">
        </div>
        <div>
          <label class="label">Username</label>
          <input class="input" name="username" value="<?php echo e($router->username); ?>" required>
        </div>
        <div>
          <label class="label">Password</label>
          <input class="input" type="password" name="password" value="<?php echo e($router->password); ?>" required>
        </div>
        <div>
          <label class="label">TLS</label>
          <select class="input" name="use_tls">
            <option value="0" <?php if(!$router->use_tls): echo 'selected'; endif; ?>>No</option>
            <option value="1" <?php if($router->use_tls): echo 'selected'; endif; ?>>Yes</option>
          </select>
        </div>
      </div>

      <div style="margin-top:14px;display:flex;gap:8px;justify-content:flex-end">
        <a href="<?php echo e(route('routers.index')); ?>" class="btn-ghost" style="text-decoration:none">Cancel</a>
        <button class="btn">Update</button>
      </div>
    </form>
  </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\bluebando-v3\resources\views/routers/edit.blade.php ENDPATH**/ ?>