<?php $__env->startSection('title', 'Record Outage'); ?>

<?php $__env->startSection('header'); ?>
    <?php if (isset($component)) { $__componentOriginal111218edafe37a3ff745a947bea8c7e5 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal111218edafe37a3ff745a947bea8c7e5 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.isp-page-header','data' => ['title' => 'Record outage','module' => 'Network','description' => 'Document a downtime event. Compensation is never applied automatically — you control it from the outage detail page.']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('isp-page-header'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Record outage','module' => 'Network','description' => 'Document a downtime event. Compensation is never applied automatically — you control it from the outage detail page.']); ?>
         <?php $__env->slot('actions', null, []); ?> 
            <a href="<?php echo e(route('isp.outages.index')); ?>" class="pb-btn">Back to outages</a>
         <?php $__env->endSlot(); ?>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal111218edafe37a3ff745a947bea8c7e5)): ?>
<?php $attributes = $__attributesOriginal111218edafe37a3ff745a947bea8c7e5; ?>
<?php unset($__attributesOriginal111218edafe37a3ff745a947bea8c7e5); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal111218edafe37a3ff745a947bea8c7e5)): ?>
<?php $component = $__componentOriginal111218edafe37a3ff745a947bea8c7e5; ?>
<?php unset($__componentOriginal111218edafe37a3ff745a947bea8c7e5); ?>
<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="mx-auto max-w-3xl">
        <form method="POST" action="<?php echo e(route('isp.outages.store')); ?>" class="pb-card space-y-5 p-6">
            <?php echo csrf_field(); ?>

            <div>
                <label class="isp-form-label" for="title">Title</label>
                <input id="title" type="text" name="title" value="<?php echo e(old('title')); ?>" class="isp-form-input" placeholder="Tower 3 fiber cut" required>
                <?php $__errorArgs = ['title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><p class="mt-1 text-xs text-rose-600"><?php echo e($message); ?></p><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <div>
                <label class="isp-form-label" for="description">Description</label>
                <textarea id="description" name="description" rows="4" class="isp-form-textarea" placeholder="What failed, impact, ETA…"><?php echo e(old('description')); ?></textarea>
                <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><p class="mt-1 text-xs text-rose-600"><?php echo e($message); ?></p><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <div>
                <label class="isp-form-label" for="router_id">Affected router (optional)</label>
                <select id="router_id" name="router_id" class="isp-form-select">
                    <option value="">— No specific router —</option>
                    <?php $__currentLoopData = $routers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $router): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($router->id); ?>" <?php if(old('router_id') == $router->id): echo 'selected'; endif; ?>>
                            <?php echo e($router->name); ?> (<?php echo e($router->ip_address); ?>)
                        </option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <p class="isp-settings-hint mt-1">When set, customers linked to this router appear on the compensation screen.</p>
                <?php $__errorArgs = ['router_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><p class="mt-1 text-xs text-rose-600"><?php echo e($message); ?></p><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <div class="grid gap-5 sm:grid-cols-2">
                <div>
                    <label class="isp-form-label" for="started_at">Start time</label>
                    <input id="started_at" type="datetime-local" name="started_at" value="<?php echo e(old('started_at', now()->format('Y-m-d\TH:i'))); ?>" class="isp-form-input" required>
                    <?php $__errorArgs = ['started_at'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><p class="mt-1 text-xs text-rose-600"><?php echo e($message); ?></p><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
                <div>
                    <label class="isp-form-label" for="ended_at">End time (optional)</label>
                    <input id="ended_at" type="datetime-local" name="ended_at" value="<?php echo e(old('ended_at')); ?>" class="isp-form-input">
                    <?php $__errorArgs = ['ended_at'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><p class="mt-1 text-xs text-rose-600"><?php echo e($message); ?></p><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>

            <div>
                <label class="isp-form-label" for="status">Status</label>
                <select id="status" name="status" class="isp-form-select">
                    <option value="active" <?php if(old('status', 'active') === 'active'): echo 'selected'; endif; ?>>Active</option>
                    <option value="resolved" <?php if(old('status') === 'resolved'): echo 'selected'; endif; ?>>Resolved</option>
                </select>
                <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><p class="mt-1 text-xs text-rose-600"><?php echo e($message); ?></p><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <div class="flex flex-wrap justify-end gap-2 border-t border-[var(--pb-border)] pt-4">
                <a href="<?php echo e(route('isp.outages.index')); ?>" class="pb-btn">Cancel</a>
                <button type="submit" class="pb-btn pb-btn-primary">Save outage</button>
            </div>
        </form>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\ispbilling\resources\views/isp/outages/create.blade.php ENDPATH**/ ?>