<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">Mis asignaciones</h2>
            <p class="mt-1 text-sm text-[var(--setel-text-muted)]">Primero aparecen las OT pendientes u observadas; al final las finalizadas. Abra el detalle para registrar clareo y estado interno.</p>
        </div>

        <div class="setel-users-filter-strip border-b border-[var(--setel-card-border)] px-5 py-4">
            <div class="flex flex-col gap-4 sm:flex-row sm:items-end">
                <div class="setel-users-filter-field min-w-0 flex-1 sm:max-w-md">
                    <label class="setel-users-filter-label" for="assign-search">Buscar 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="assign-search"
                            type="search"
                            class="setel-input setel-input--has-icon"
                            wire:model.live.debounce.400ms="search"
                            placeholder="Código OT"
                            autocomplete="off"
                        />
                    </div>
                </div>
                <div class="setel-users-filter-field w-full min-w-[5.5rem] sm:w-[5.75rem]">
                    <label class="setel-users-filter-label" for="assign-per-page">Por página</label>
                    <select id="assign-per-page" class="setel-input w-full py-0 pe-8" wire:model.live="perPage">
                        <option value="10">10</option>
                        <option value="15">15</option>
                        <option value="25">25</option>
                    </select>
                </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-[720px]">
                <thead>
                    <tr>
                        <th class="w-[40px] text-center">#</th>
                        <th>OT</th>
                        <th>Sitio</th>
                        <th>Tipo</th>
                        <th class="text-center">Estado interno</th>
                        <th>Escala</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'] = 'assign-row-'.e($work->id).''; ?>wire:key="assign-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">
                                <span class="font-medium"><?php echo e($work->site?->code); ?></span>
                                <span class="mt-0.5 block truncate text-[var(--setel-text-muted)]"><?php echo e($work->site?->name); ?></span>
                            </td>
                            <td class="text-sm text-[var(--setel-text)]"><?php echo e($work->workType?->name); ?></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="whitespace-nowrap text-sm tabular-nums text-[var(--setel-text-muted)]"><?php echo e($work->scale_datetime?->format('d/m/Y H:i')); ?></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="7" class="py-12 text-center text-sm text-[var(--setel-text-muted)]">No tiene asignaciones que coincidan.</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\assignments-index.blade.php ENDPATH**/ ?>