<?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('header', null, []); ?> 
        <div class="d-flex flex-wrap align-items-center justify-content-between gap-2">
            <h2 class="h4 mb-0">Interface Condition</h2>
            <div class="d-flex gap-2"><a href="<?php echo e(route('admin.olts.show', $olt)); ?>" class="btn btn-outline-secondary"><i data-feather="layout" class="me-1"></i>Overview</a><a href="<?php echo e(route('admin.olts.onus', $olt)); ?>" class="btn btn-primary"><i data-feather="radio" class="me-1"></i>ONU Tx/Rx</a></div>
        </div>
     <?php $__env->endSlot(); ?>

    <?php ($interfaces = ($olt->gateway_snapshot ?? [])['interfaces'] ?? []); ?>
    <?php ($upCount = collect($interfaces)->where('oper_status', 'up')->count()); ?>
    <?php ($downCount = collect($interfaces)->where('oper_status', 'down')->count()); ?>

    <div class="olt-page-panel mb-3"><div class="olt-summary-grid"><div class="olt-summary-item"><span class="olt-summary-icon text-primary bg-primary-subtle" data-feather="layers"></span><div><span>Total Interfaces</span><strong><?php echo e(count($interfaces)); ?></strong></div></div><div class="olt-summary-item"><span class="olt-summary-icon text-success bg-success-subtle" data-feather="check-circle"></span><div><span>Up</span><strong><?php echo e($upCount); ?></strong></div></div><div class="olt-summary-item"><span class="olt-summary-icon text-danger bg-danger-subtle" data-feather="x-circle"></span><div><span>Down</span><strong><?php echo e($downCount); ?></strong></div></div></div></div>

    <div class="olt-page-panel"><div class="table-responsive"><table id="oltInterfacesTable" class="table olt-data-table align-middle mb-0 w-100"><thead><tr><th>Interface</th><th>Type</th><th>Speed</th><th>Admin</th><th>Condition</th></tr></thead><tbody><?php $__currentLoopData = $interfaces; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $interface): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><tr><td><strong><?php echo e($interface['name'] ?? 'Interface '.$interface['index']); ?></strong><small class="d-block">#<?php echo e($interface['index']); ?></small></td><td><?php echo e($interface['type'] ?? '—'); ?></td><td><?php echo e(number_format(((int) ($interface['speed_bps'] ?? 0)) / 1000000, 0)); ?> Mbps</td><td><span class="olt-admin-state"><?php echo e(ucfirst($interface['admin_status'] ?? 'unknown')); ?></span></td><td><span class="olt-status-pill is-<?php echo e($interface['oper_status'] ?? 'unknown'); ?>"><?php echo e(ucfirst($interface['oper_status'] ?? 'unknown')); ?></span></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></tbody></table></div></div>

    <?php $__env->startPush('scripts'); ?><style>
        .olt-page-panel{padding:1rem;border:1px solid #e4ebf3;border-radius:18px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.045)}.olt-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.olt-summary-item{display:flex;align-items:center;gap:.75rem;padding:.85rem;border:1px solid #edf1f6;border-radius:14px;background:#fbfcfe}.olt-summary-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:12px}.olt-summary-icon svg{width:18px;height:18px}.olt-summary-item span:not(.olt-summary-icon){display:block;color:#64748b;font-size:.72rem}.olt-summary-item strong{display:block;color:#102a43;font-size:1.05rem}.olt-data-table{border-collapse:separate;border-spacing:0}.olt-data-table thead th{padding:.85rem .75rem;border:0;border-bottom:1px solid #e7edf4;background:#f7f9fc;color:#52647a;font-size:.71rem;font-weight:750;letter-spacing:.025em;text-transform:uppercase}.olt-data-table tbody td{padding:.88rem .75rem;border-color:#edf1f5;color:#243b53;font-size:.82rem}.olt-data-table tbody tr:hover{background:#f8fbff}.olt-data-table small{color:#7b8ba1;font-size:.72rem}.olt-admin-state{font-size:.76rem;font-weight:650;color:#52647a}.olt-status-pill{display:inline-flex;padding:.26rem .55rem;border-radius:999px;font-size:.7rem;font-weight:700}.olt-status-pill.is-up{color:#087443;background:#dcfce7}.olt-status-pill.is-down{color:#b42318;background:#fee4e2}.olt-status-pill.is-unknown{color:#596780;background:#edf2f7}#oltInterfacesTable_wrapper .dataTables_filter{float:right!important}#oltInterfacesTable_wrapper .dataTables_filter input{width:240px;max-width:100%;height:38px;border:1px solid #dce5ef;border-radius:10px;padding:0 .75rem;outline:0}#oltInterfacesTable_wrapper .dataTables_length select{height:38px;border:1px solid #dce5ef;border-radius:10px;padding:0 .5rem;background:#fff}@media(max-width:767.98px){.olt-summary-grid{grid-template-columns:1fr}.olt-page-panel{padding:.7rem}#oltInterfacesTable_wrapper .dataTables_filter{float:none!important;margin-top:.75rem}#oltInterfacesTable_wrapper .dataTables_filter input{width:100%}}
    </style><script>$(function(){$('#oltInterfacesTable').DataTable({pageLength:10,lengthMenu:[[10,25,50,100,-1],[10,25,50,100,'All']],order:[[0,'asc']],responsive:true,autoWidth:false,language:{search:'',searchPlaceholder:'Search interface...',lengthMenu:'_MENU_ entries per page',info:'Showing _START_ to _END_ of _TOTAL_ interfaces',infoEmpty:'No interface data',zeroRecords:'No matching interface found'}});});</script><?php $__env->stopPush(); ?>
 <?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 D:\herd\billing\laravel-app\resources\views\admin\mikrotiks\olts\interfaces.blade.php ENDPATH**/ ?>