<div class="flex w-full flex-col gap-6">
    <div class="setel-card overflow-hidden">
        <div class="border-b border-[var(--setel-card-border)] px-5 py-4">
            <h2 class="text-lg font-semibold setel-text-primary"><?php echo e($this->pageTitle); ?></h2>
            <p class="mt-1 text-sm text-[var(--setel-text-muted)]">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->nocProfile === 'review'): ?>
                    OT con seguimiento NOC en estado cerrado. Use el detalle para auditoría o comentarios adicionales.
                <?php else: ?>
                    Cola operativa: pendientes u observadas (campo o NOC). En el detalle puede actualizar estado, comentario y cierre.
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </p>
        </div>

        <div class="setel-users-filter-strip border-b border-[var(--setel-card-border)] px-5 py-4">
            <div class="flex min-w-0 flex-col gap-4 lg:flex-row lg:flex-wrap lg:items-end lg:gap-4">
                <div class="setel-users-filter-field min-w-0 w-full lg:max-w-xs lg:flex-1">
                    <label class="setel-users-filter-label" for="noc-search">OT</label>
                    <div class="setel-input-icon-wrap isolate">
                        <span class="setel-input-icon" aria-hidden="true"><?php if (isset($component)) { $__componentOriginalca8f84dbee6a7578bd710eaadfa89b0e = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalca8f84dbee6a7578bd710eaadfa89b0e = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::icon.search','data' => ['class' => 'size-5 shrink-0']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::icon.search'); ?>
<?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(['class' => 'size-5 shrink-0']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalca8f84dbee6a7578bd710eaadfa89b0e)): ?>
<?php $attributes = $__attributesOriginalca8f84dbee6a7578bd710eaadfa89b0e; ?>
<?php unset($__attributesOriginalca8f84dbee6a7578bd710eaadfa89b0e); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalca8f84dbee6a7578bd710eaadfa89b0e)): ?>
<?php $component = $__componentOriginalca8f84dbee6a7578bd710eaadfa89b0e; ?>
<?php unset($__componentOriginalca8f84dbee6a7578bd710eaadfa89b0e); ?>
<?php endif; ?></span>
                        <input id="noc-search" type="search" class="setel-input setel-input--has-icon" wire:model.live.debounce.400ms="search" placeholder="Buscar" autocomplete="off" />
                    </div>
                </div>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->nocProfile === 'closure'): ?>
                    <div class="setel-users-filter-field w-full min-w-[9rem] sm:w-[10rem]">
                        <label class="setel-users-filter-label" for="noc-track">Seguimiento NOC</label>
                        <select id="noc-track" class="setel-input w-full py-0 pe-8" wire:model.live="nocTrackingFilter">
                            <option value="">Todos</option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $nocTrackingCases; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $case): $__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($case->value); ?>"><?php echo e($case->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>
                    </div>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <div class="setel-users-filter-field w-full min-w-[9rem] sm:w-[10rem]">
                    <label class="setel-users-filter-label" for="noc-int">Estado interno</label>
                    <select id="noc-int" class="setel-input w-full py-0 pe-8" wire:model.live="internalStatusFilter">
                        <option value="">Todos</option>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $internalStatusCases; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $case): $__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($case->value); ?>"><?php echo e($case->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>
                </div>
                <div class="setel-users-filter-field w-full min-w-[9rem] sm:w-[10rem]">
                    <label class="setel-users-filter-label" for="noc-ext">Estado externo</label>
                    <select id="noc-ext" class="setel-input w-full py-0 pe-8" wire:model.live="workStatusFilter">
                        <option value="">Todos</option>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $workStatusCases; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $case): $__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($case->value); ?>"><?php echo e($case->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>
                </div>
                <div class="setel-users-filter-field w-full min-w-[10rem] sm:w-[12rem]">
                    <label class="setel-users-filter-label" for="noc-project">Proyecto</label>
                    <select id="noc-project" class="setel-input w-full py-0 pe-8" wire:model.live="projectFilter">
                        <option value="">Todos</option>
                        <option value="none">Sin proyecto</option>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $this->projectsForFilter; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $project): $__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($project->id); ?>"><?php echo e($project->name); ?></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>
                </div>
                <div class="setel-users-filter-field w-full min-w-[5.5rem] sm:w-[5.75rem]">
                    <label class="setel-users-filter-label" for="noc-per-page">Por página</label>
                    <select id="noc-per-page" class="setel-input w-full py-0 pe-8" wire:model.live="perPage">
                        <option value="15">15</option>
                        <option value="20">20</option>
                        <option value="50">50</option>
                    </select>
                </div>
                <div class="setel-users-filter-field flex w-full min-w-0 sm:w-auto">
                    <span class="setel-users-filter-label select-none text-transparent sm:invisible" aria-hidden="true">·</span>
                    <button type="button" class="setel-btn-secondary h-[2.5rem] w-full px-4 text-sm sm:w-auto" wire:click="resetFilters">Limpiar</button>
                </div>
            </div>
        </div>

        <div class="setel-table-wrap max-w-full overflow-x-auto" wire:loading.class="opacity-60">
            <table class="setel-table min-w-[1000px]">
                <thead>
                    <tr>
                        <th class="w-[40px] text-center">#</th>
                        <th>OT</th>
                        <th>Sitio</th>
                        <th>Técnico</th>
                        <th class="text-center">NOC seg.</th>
                        <th class="text-center">Int.</th>
                        <th>NOC (última acción)</th>
                        <th class="w-[100px] text-center">Detalle</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $this->works; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $work): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <tr <?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::$currentLoop['key'] = 'noc-row-'.e($work->id).''; ?>wire:key="noc-row-<?php echo e($work->id); ?>">
                            <td class="text-center text-sm text-[var(--setel-text-muted)]"><?php echo e($loop->iteration + ($this->works->currentPage() - 1) * $this->works->perPage()); ?></td>
                            <td class="font-mono font-semibold text-[var(--setel-text)]"><?php echo e($work->ot); ?></td>
                            <td class="text-sm"><?php echo e($work->site?->code); ?> <span class="text-[var(--setel-text-muted)]">· <?php echo e(\Illuminate\Support\Str::limit((string) ($work->site?->name ?? ''), 28)); ?></span></td>
                            <td class="text-sm text-[var(--setel-text)]"><?php echo e($work->technician?->fullName() ?? '—'); ?></td>
                            <td class="text-center">
                                <span class="<?php echo e($work->nocTrackingEnum()?->badgeClass() ?? 'setel-badge setel-badge--neutral'); ?> text-xs"><?php echo e($work->nocTrackingEnum()?->label() ?? $work->noc_tracking_status); ?></span>
                            </td>
                            <td class="text-center">
                                <span class="<?php echo e(\App\Enums\WorkInternalStatus::tryFrom($work->internal_status)?->badgeClass() ?? 'setel-badge setel-badge--neutral'); ?> text-xs"><?php echo e(\App\Enums\WorkInternalStatus::tryFrom($work->internal_status)?->label() ?? $work->internal_status); ?></span>
                            </td>
                            <td class="text-sm text-[var(--setel-text-muted)]"><?php echo e($work->noc?->fullName() ?? '—'); ?></td>
                            <td class="text-center">
                                <a href="<?php echo e(route('works.show', $work)); ?>" wire:navigate class="setel-btn-secondary inline-flex items-center gap-1 px-3 py-1.5 text-xs">
                                    <?php if (isset($component)) { $__componentOriginal2e57535a42d25d5415c31aa83132341b = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal2e57535a42d25d5415c31aa83132341b = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::icon.eye','data' => ['class' => 'size-3.5']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::icon.eye'); ?>
<?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(['class' => 'size-3.5']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal2e57535a42d25d5415c31aa83132341b)): ?>
<?php $attributes = $__attributesOriginal2e57535a42d25d5415c31aa83132341b; ?>
<?php unset($__attributesOriginal2e57535a42d25d5415c31aa83132341b); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal2e57535a42d25d5415c31aa83132341b)): ?>
<?php $component = $__componentOriginal2e57535a42d25d5415c31aa83132341b; ?>
<?php unset($__componentOriginal2e57535a42d25d5415c31aa83132341b); ?>
<?php endif; ?>
                                    Ver
                                </a>
                            </td>
                        </tr>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        <tr>
                            <td colspan="8" class="py-12 text-center text-sm text-[var(--setel-text-muted)]">Sin resultados.</td>
                        </tr>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </tbody>
            </table>
        </div>

        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->works->hasPages()): ?>
            <div class="border-t border-[var(--setel-card-border)] px-5 py-4">
                <?php echo e($this->works->links()); ?>

            </div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
    </div>
</div>
<?php /**PATH C:\laragon\www\setelsat-gilat-manager\resources\views\livewire\works\noc-tracking-index.blade.php ENDPATH**/ ?>