<?php
    use App\Enums\NocTrackingStatus;
    use App\Enums\WorkAssignmentStatus;
    use App\Enums\WorkInternalStatus;
    use App\Enums\WorkPriority;
    use App\Enums\WorkStatus;
?>

<div class="flex w-full flex-col gap-6">
    <?php echo $__env->make('components.catalog.toast', ['showToast' => $showToast, 'toastType' => $toastType, 'toastMessage' => $toastMessage, 'toastSeq' => $toastSeq], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="relative overflow-hidden rounded-2xl border border-[var(--setel-card-border)] bg-gradient-to-br from-[var(--setel-content-bg)] via-[var(--setel-card)]/30 to-[var(--setel-primary)]/5 p-1 shadow-sm">
        <div class="flex flex-col gap-6 rounded-[0.9rem] bg-[var(--setel-content-bg)] px-5 py-6 sm:flex-row sm:items-stretch sm:justify-between sm:gap-8 sm:px-8 sm:py-7">
            <div class="flex min-w-0 flex-1 items-start gap-5">
                <div class="flex h-24 w-20 shrink-0 flex-col items-center justify-center rounded-xl bg-[var(--setel-primary)]/10 text-[var(--setel-primary)] ring-1 ring-[var(--setel-primary)]/20">
                    <span class="text-[10px] font-semibold uppercase tracking-wider text-[var(--setel-text-muted)]"><?php echo e(\Illuminate\Support\Str::ucfirst($this->todayWeekday)); ?></span>
                    <span class="text-3xl font-bold tabular-nums leading-none"><?php echo e($this->todayDayNumber); ?></span>
                    <span class="mt-1 px-1 text-center text-[11px] font-medium leading-tight text-[var(--setel-text)]"><?php echo e($this->todayMonthYear); ?></span>
                </div>
                <div class="min-w-0 flex-1 pt-1">
                    <p class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Operación del día</p>
                    <p class="mt-1 text-lg font-semibold capitalize leading-snug text-[var(--setel-text)] sm:text-xl"><?php echo e($this->todayHeading); ?></p>
                    <p class="mt-2 text-sm text-[var(--setel-text-muted)]">Fecha calendario: <span class="font-mono text-[var(--setel-text)]"><?php echo e($this->todayIso); ?></span></p>
                </div>
            </div>
            <div class="flex shrink-0 flex-col items-stretch justify-center gap-3 sm:items-end">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(! $this->withinOperationsWindow): ?>
                    <span class="setel-badge setel-badge--neutral w-fit text-xs">Fuera de horario</span>
                <?php elseif($this->todayHasOpenAssignments): ?>
                    <span class="setel-badge w-fit text-xs bg-emerald-100 text-emerald-900 dark:bg-emerald-950/50 dark:text-emerald-200">Lote abierto</span>
                <?php else: ?>
                    <span class="setel-badge setel-badge--neutral w-fit text-xs">Sin asignaciones hoy</span>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <div class="flex flex-wrap items-center gap-2 sm:justify-end">
                    <button
                        type="button"
                        wire:click="openHelpModal"
                        class="inline-flex size-10 items-center justify-center rounded-full border border-[var(--setel-card-border)] bg-[var(--setel-card)] text-base font-bold text-[var(--setel-primary)] shadow-sm hover:bg-[var(--setel-content-bg)]"
                        title="Ayuda"
                        aria-label="Ayuda e instrucciones"
                    >
                        ?
                    </button>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($activeTab === 'assign'): ?>
                        <button
                            type="button"
                            wire:click="openCloseDayConfirm"
                            wire:loading.attr="disabled"
                            wire:target="openCloseDayConfirm,confirmCloseDay"
                            <?php if(! $this->closeDayButtonEnabled): echo 'disabled'; endif; ?>
                            title="Disponible entre <?php echo e(config('work_coordination.close_button_from')); ?> y <?php echo e(config('work_coordination.operations_end')); ?> (<?php echo e(config('app.timezone')); ?>), con al menos una OT abierta hoy y sin días anteriores pendientes de cierre."
                            class="min-h-[2.75rem] min-w-[12rem] rounded-lg bg-slate-800 px-6 text-sm font-semibold uppercase tracking-wide text-white shadow-md hover:bg-slate-900 disabled:cursor-not-allowed disabled:opacity-40 dark:bg-slate-200 dark:text-slate-900 dark:hover:bg-white"
                        >
                            <span wire:loading.remove wire:target="confirmCloseDay">Cerrar trabajos</span>
                            <span wire:loading wire:target="confirmCloseDay">Cerrando…</span>
                        </button>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            </div>
        </div>
    </div>

    <div class="setel-card overflow-hidden">
        <div class="flex flex-wrap items-center justify-between gap-3 border-b border-[var(--setel-card-border)] px-5 py-4">
            <h2 class="text-lg font-semibold setel-text-primary">Asignaciones</h2>
        </div>

        <div class="flex border-b border-[var(--setel-card-border)] px-5">
            <button
                type="button"
                wire:click="$set('activeTab', 'assign')"
                class="min-w-0 flex-1 border-b-2 px-3 py-3 text-sm font-medium transition-colors sm:flex-none sm:px-5 <?php echo e($activeTab === 'assign' ? 'border-[var(--setel-primary)] text-[var(--setel-primary)]' : 'border-transparent text-[var(--setel-text-muted)] hover:text-[var(--setel-text)]'); ?>"
            >
                Asignar
            </button>
            <button
                type="button"
                wire:click="$set('activeTab', 'history')"
                class="min-w-0 flex-1 border-b-2 px-3 py-3 text-sm font-medium transition-colors sm:flex-none sm:px-5 <?php echo e($activeTab === 'history' ? 'border-[var(--setel-primary)] text-[var(--setel-primary)]' : 'border-transparent text-[var(--setel-text-muted)] hover:text-[var(--setel-text)]'); ?>"
            >
                Historial
            </button>
        </div>

        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($activeTab === 'assign'): ?>
            <div class="space-y-4 border-b border-[var(--setel-card-border)] bg-[var(--setel-content-bg)] px-5 py-4">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->blockingEarlierOpenDate): ?>
                    <div class="rounded-lg border border-amber-200/80 bg-amber-50 px-4 py-3 text-sm text-amber-950 dark:border-amber-900/40 dark:bg-amber-950/30 dark:text-amber-100">
                        Hay asignaciones sin cerrar con fecha anterior al hoy (<strong><?php echo e($this->blockingEarlierOpenDate); ?></strong>).
                        Ciérrelas antes de seguir.
                    </div>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(! $this->withinOperationsWindow): ?>
                    <p class="text-sm text-[var(--setel-text)]">
                        <span class="font-semibold text-slate-700 dark:text-slate-300">Fuera de horario</span>
                        · asignar y retirar del día solo entre <strong><?php echo e(config('work_coordination.operations_start')); ?></strong> y <strong><?php echo e(config('work_coordination.operations_end')); ?></strong> (zona <?php echo e(config('app.timezone')); ?>). El botón <strong>Cerrar trabajos</strong> se habilita desde las <strong><?php echo e(config('work_coordination.close_button_from')); ?></strong>.
                    </p>
                <?php elseif($this->todayHasOpenAssignments): ?>
                    <p class="text-sm text-[var(--setel-text)]">
                        <span class="font-semibold text-emerald-700 dark:text-emerald-400">Lote abierto</span>
                        · use <strong>Lotes por asignar</strong> o <strong>Trabajos de hoy</strong> debajo. Cierre el lote con <strong>Cerrar trabajos</strong> (desde <?php echo e(config('work_coordination.close_button_from')); ?> hasta <?php echo e(config('work_coordination.operations_end')); ?>).
                    </p>
                <?php else: ?>
                    <p class="text-sm text-[var(--setel-text-muted)]">
                        Aún no hay asignaciones registradas para hoy. Dentro del horario, abra <strong>Lotes por asignar</strong>, marque OT y asigne técnico. El cierre masivo está disponible desde las <?php echo e(config('work_coordination.close_button_from')); ?>.
                    </p>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </div>

            <div class="setel-users-filter-strip border-b border-[var(--setel-card-border)] px-5 py-4">
                <p class="mb-3 text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Filtros (proyecto → tipo)</p>
                <div class="flex flex-col gap-4 sm:flex-row sm:flex-wrap sm:items-end">
                    <div class="setel-users-filter-field min-w-0 w-full sm:max-w-xs">
                        <label class="setel-users-filter-label" for="coord-filter-proj">Proyecto</label>
                        <select id="coord-filter-proj" class="setel-input w-full py-0 pe-8" wire:model.live="filterAssignProjectId">
                            <option value="">Todos los proyectos</option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $this->projectsForFilters; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $proj): $__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($proj->id); ?>"><?php echo e($proj->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 min-w-0 w-full sm:max-w-xs">
                        <label class="setel-users-filter-label" for="coord-filter-type">Tipo de trabajo</label>
                        <select
                            id="coord-filter-type"
                            class="setel-input w-full py-0 pe-8"
                            wire:model.live="filterAssignWorkTypeId"
                            <?php if(! $filterAssignProjectId): echo 'disabled'; endif; ?>
                        >
                            <option value=""><?php echo e($filterAssignProjectId ? 'Todos los tipos del proyecto' : 'Elija proyecto primero'); ?></option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $this->assignFilterWorkTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $wt): $__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($wt->id); ?>"><?php echo e($wt->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>
            </div>

            <div class="flex border-b border-[var(--setel-card-border)] bg-[var(--setel-content-bg)] px-5">
                <button
                    type="button"
                    wire:click="$set('assignSubTab', 'lote')"
                    class="min-w-0 flex-1 border-b-2 px-3 py-3 text-sm font-medium transition-colors sm:flex-none sm:px-6 <?php echo e($assignSubTab === 'lote' ? 'border-[var(--setel-primary)] text-[var(--setel-primary)]' : 'border-transparent text-[var(--setel-text-muted)] hover:text-[var(--setel-text)]'); ?>"
                >
                    Lotes por asignar
                </button>
                <button
                    type="button"
                    wire:click="$set('assignSubTab', 'quitar')"
                    class="min-w-0 flex-1 border-b-2 px-3 py-3 text-sm font-medium transition-colors sm:flex-none sm:px-6 <?php echo e($assignSubTab === 'quitar' ? 'border-[var(--setel-primary)] text-[var(--setel-primary)]' : 'border-transparent text-[var(--setel-text-muted)] hover:text-[var(--setel-text)]'); ?>"
                >
                    Trabajos de hoy
                </button>
            </div>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($assignSubTab === 'lote'): ?>
                <div class="setel-users-filter-strip border-b border-[var(--setel-card-border)] px-5 py-4">
                    <div class="flex flex-col gap-4 lg:flex-row lg:flex-wrap lg:items-end">
                        <div class="setel-users-filter-field w-full min-w-0 lg:max-w-md lg:flex-1">
                            <?php echo $__env->make('livewire.works.partials.assignment-day-technician-picker', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                        <div class="setel-users-filter-field flex w-full min-w-0 items-end lg:w-auto">
                            <button
                                type="button"
                                class="setel-btn-primary h-[2.5rem] w-full px-4 text-sm lg:w-auto"
                                wire:click="requestAssignConfirm"
                                wire:loading.attr="disabled"
                                wire:target="requestAssignConfirm,confirmAssignSelection"
                                <?php if(! $this->withinOperationsWindow || $this->blockingEarlierOpenDate !== null): echo 'disabled'; endif; ?>
                            >
                                <span wire:loading.remove wire:target="confirmAssignSelection">Asignar selección</span>
                                <span wire:loading wire:target="confirmAssignSelection">Guardando…</span>
                            </button>
                        </div>
                    </div>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['selectedWorkIds'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <p class="mt-2 text-sm text-red-600"><?php echo e($message); ?></p>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>

                <section class="border-b border-[var(--setel-card-border)] px-5 py-6">
                    <div class="flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between">
                        <div>
                            <h3 class="text-base font-semibold text-[var(--setel-text)]">Sin asignar hoy</h3>
                            <p class="mt-1 text-sm text-[var(--setel-text-muted)]">Pendiente u observada, sin fila abierta para <?php echo e($this->todayIso); ?>.</p>
                        </div>
                        <span class="setel-badge setel-badge--neutral w-fit text-xs"><?php echo e($this->worksPendingToday->count()); ?> OT</span>
                    </div>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->worksPendingToday->count() >= 500): ?>
                        <p class="mt-3 text-xs text-amber-700 dark:text-amber-400">Se muestran como máximo 500 resultados. Use proyecto y tipo para acotar.</p>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    <div class="setel-table-wrap mt-4 max-w-full overflow-x-auto" wire:loading.class="opacity-60">
                        <table class="setel-table min-w-[960px]">
                            <thead>
                                <tr>
                                    <th class="w-[44px] text-center"><span class="sr-only">Seleccionar</span></th>
                                    <th>OT</th>
                                    <th>Proyecto</th>
                                    <th>Sitio</th>
                                    <th>Tipo</th>
                                    <th class="text-center">Estado int.</th>
                                    <th class="w-[100px] text-center">Resumen</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->worksPendingToday; $__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'] = 'coord-pend-'.e($work->id).''; ?>wire:key="coord-pend-<?php echo e($work->id); ?>">
                                        <td class="text-center">
                                            <input
                                                type="checkbox"
                                                class="size-4 rounded border-[var(--setel-card-border)]"
                                                wire:model.live="selectedWorkIds"
                                                value="<?php echo e($work->id); ?>"
                                                <?php if(! $this->withinOperationsWindow || $this->blockingEarlierOpenDate !== null): echo 'disabled'; endif; ?>
                                            />
                                        </td>
                                        <td class="font-mono font-semibold text-[var(--setel-text)]"><?php echo e($work->ot); ?></td>
                                        <td class="text-sm text-[var(--setel-text-muted)]"><?php echo e($work->site?->project?->name ?? '—'); ?></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(WorkInternalStatus::tryFrom($work->internal_status)?->badgeClass() ?? 'setel-badge setel-badge--neutral'); ?> text-xs"><?php echo e(WorkInternalStatus::tryFrom($work->internal_status)?->label() ?? $work->internal_status); ?></span>
                                        </td>
                                        <td class="text-center">
                                            <button type="button" class="setel-btn-secondary inline-flex items-center gap-1 px-3 py-1.5 text-xs" wire:click="openWorkPreview(<?php echo e($work->id); ?>)">
                                                <?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
                                            </button>
                                        </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-10 text-center text-sm text-[var(--setel-text-muted)]">No hay OT que coincidan con los filtros.</td>
                                    </tr>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                </section>
            <?php else: ?>
                <div class="setel-users-filter-strip border-b border-[var(--setel-card-border)] px-5 py-4">
                    <div class="flex flex-col gap-4 lg:flex-row lg:flex-wrap lg:items-end">
                        <div class="setel-users-filter-field w-full min-w-0 lg:max-w-md lg:flex-1">
                            <?php echo $__env->make('livewire.works.partials.assignment-day-technician-picker', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                        <div class="setel-users-filter-field flex w-full min-w-0 items-end lg:w-auto">
                            <button
                                type="button"
                                class="setel-btn-primary h-[2.5rem] w-full px-4 text-sm lg:w-auto"
                                wire:click="requestAssignConfirm"
                                wire:loading.attr="disabled"
                                wire:target="requestAssignConfirm,confirmAssignSelection"
                                <?php if(! $this->withinOperationsWindow || $this->blockingEarlierOpenDate !== null): echo 'disabled'; endif; ?>
                            >
                                <span wire:loading.remove wire:target="confirmAssignSelection">Reasignar selección</span>
                                <span wire:loading wire:target="confirmAssignSelection">Guardando…</span>
                            </button>
                        </div>
                    </div>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['selectedUnassignWorkIds'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <p class="mt-2 text-sm text-red-600"><?php echo e($message); ?></p>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    <p class="mt-4 text-sm text-[var(--setel-text-muted)]">Marque una o varias OT asignadas hoy y pulse <strong>Retirar del día (selección)</strong> para quitarlas del lote. Para cambiar de técnico, elija técnico arriba y use <strong>Reasignar selección</strong>.</p>
                    <div class="mt-3 flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-end">
                        <button
                            type="button"
                            class="inline-flex min-h-[2.5rem] items-center justify-center gap-2 rounded-lg border-2 border-amber-600 bg-amber-50 px-5 text-sm font-semibold text-amber-950 hover:bg-amber-100 disabled:cursor-not-allowed disabled:opacity-40 dark:border-amber-500 dark:bg-amber-950/40 dark:text-amber-100 dark:hover:bg-amber-950/70"
                            wire:click="requestBulkUnassignConfirm"
                            wire:loading.attr="disabled"
                            wire:target="requestBulkUnassignConfirm,confirmBulkUnassignFromToday"
                            <?php if(! $this->withinOperationsWindow || $this->blockingEarlierOpenDate !== null): echo 'disabled'; endif; ?>
                        >
                            <?php if (isset($component)) { $__componentOriginal11b79e24357a5468b04fa815ae4b1891 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal11b79e24357a5468b04fa815ae4b1891 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::icon.arrow-uturn-left','data' => ['class' => 'size-4 shrink-0']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::icon.arrow-uturn-left'); ?>
<?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-4 shrink-0']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal11b79e24357a5468b04fa815ae4b1891)): ?>
<?php $attributes = $__attributesOriginal11b79e24357a5468b04fa815ae4b1891; ?>
<?php unset($__attributesOriginal11b79e24357a5468b04fa815ae4b1891); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal11b79e24357a5468b04fa815ae4b1891)): ?>
<?php $component = $__componentOriginal11b79e24357a5468b04fa815ae4b1891; ?>
<?php unset($__componentOriginal11b79e24357a5468b04fa815ae4b1891); ?>
<?php endif; ?>
                            <span wire:loading.remove wire:target="confirmBulkUnassignFromToday">Retirar del día (selección)</span>
                            <span wire:loading wire:target="confirmBulkUnassignFromToday">Procesando…</span>
                        </button>
                    </div>
                </div>

                <section class="border-b border-[var(--setel-card-border)] px-5 py-6">
                    <div class="flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between">
                        <div>
                            <h3 class="text-base font-semibold text-[var(--setel-text)]">Asignadas hoy</h3>
                            <p class="mt-1 text-sm text-[var(--setel-text-muted)]">Mismos filtros de proyecto y tipo. Seleccione filas y use <strong>Reasignar selección</strong> o <strong>Retirar del día</strong> arriba.</p>
                        </div>
                        <span class="setel-badge text-xs bg-sky-100 text-sky-900 dark:bg-sky-950/40 dark:text-sky-100"><?php echo e($this->worksAssignedToday->count()); ?> OT</span>
                    </div>
                    <div class="setel-table-wrap mt-4 max-w-full overflow-x-auto" wire:loading.class="opacity-60">
                        <table class="setel-table min-w-[980px]">
                            <thead>
                                <tr>
                                    <th class="w-[44px] text-center"><span class="sr-only">Seleccionar</span></th>
                                    <th>OT</th>
                                    <th>Proyecto</th>
                                    <th>Sitio</th>
                                    <th>Tipo</th>
                                    <th>Técnico</th>
                                    <th>Hora</th>
                                    <th class="w-[100px] text-center">Resumen</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->worksAssignedToday; $__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; ?>
                                    <?php
                                        $a = $work->assignments->first();
                                    ?>
                                    <tr <?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::$currentLoop['key'] = 'coord-asg-'.e($work->id).''; ?>wire:key="coord-asg-<?php echo e($work->id); ?>">
                                        <td class="text-center">
                                            <input
                                                type="checkbox"
                                                class="size-4 rounded border-[var(--setel-card-border)]"
                                                wire:model.live="selectedUnassignWorkIds"
                                                value="<?php echo e($work->id); ?>"
                                                <?php if(! $this->withinOperationsWindow || $this->blockingEarlierOpenDate !== null): echo 'disabled'; endif; ?>
                                            />
                                        </td>
                                        <td class="font-mono font-semibold text-[var(--setel-text)]"><?php echo e($work->ot); ?></td>
                                        <td class="text-sm text-[var(--setel-text-muted)]"><?php echo e($work->site?->project?->name ?? '—'); ?></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-sm font-medium text-[var(--setel-text)]"><?php echo e($a?->technician?->fullName() ?? $work->technician?->fullName() ?? '—'); ?></td>
                                        <td class="text-sm tabular-nums text-[var(--setel-text-muted)]"><?php echo e($a?->assigned_at?->format('H:i') ?? '—'); ?></td>
                                        <td class="text-center">
                                            <button type="button" class="setel-btn-secondary inline-flex items-center gap-1 px-3 py-1.5 text-xs" wire:click="openWorkPreview(<?php echo e($work->id); ?>)">
                                                <?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
                                            </button>
                                        </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-10 text-center text-sm text-[var(--setel-text-muted)]">Ninguna OT asignada hoy con estos filtros.</td>
                                    </tr>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                </section>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        <?php else: ?>
            <div class="border-b border-[var(--setel-card-border)] bg-[var(--setel-content-bg)] px-5 py-3">
                <p class="text-sm text-[var(--setel-text-muted)]">Por defecto solo se listan las asignaciones del <strong>día de hoy</strong>. Amplíe el rango de fechas si necesita otros días.</p>
            </div>
            <div class="setel-users-filter-strip border-b border-[var(--setel-card-border)] px-5 py-4">
                <p class="mb-3 text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Filtros (proyecto → tipo → sitio → fechas)</p>
                <div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-7">
                    <div class="setel-users-filter-field">
                        <label class="setel-users-filter-label" for="hist-proj">Proyecto</label>
                        <select id="hist-proj" class="setel-input w-full py-0 pe-8" wire:model.live="historyProjectId">
                            <option value="">Todos</option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $this->projectsForFilters; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $proj): $__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($proj->id); ?>"><?php echo e($proj->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">
                        <label class="setel-users-filter-label" for="hist-type">Tipo de trabajo</label>
                        <select id="hist-type" class="setel-input w-full py-0 pe-8" wire:model.live="historyWorkTypeId" <?php if(! $historyProjectId): echo 'disabled'; endif; ?>>
                            <option value=""><?php echo e($historyProjectId ? 'Todos los tipos' : 'Elija proyecto'); ?></option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $this->historyFilterWorkTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__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($type->id); ?>"><?php echo e($type->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 sm:col-span-2 lg:col-span-1">
                        <label class="setel-users-filter-label" for="hist-site">Sitio</label>
                        <select id="hist-site" class="setel-input w-full py-0 pe-8" wire:model.live="historySiteId" <?php if(! $historyProjectId): echo 'disabled'; endif; ?>>
                            <option value=""><?php echo e($historyProjectId ? 'Todos los sitios' : 'Elija proyecto'); ?></option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $this->historyFilterSites; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $site): $__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($site->id); ?>"><?php echo e($site->code); ?> · <?php echo e(\Illuminate\Support\Str::limit($site->name, 32)); ?></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">
                        <label class="setel-users-filter-label" for="hist-from">Desde</label>
                        <input id="hist-from" type="date" class="setel-input w-full" wire:model.live="historyDateFrom" />
                    </div>
                    <div class="setel-users-filter-field">
                        <label class="setel-users-filter-label" for="hist-to">Hasta</label>
                        <input id="hist-to" type="date" class="setel-input w-full" wire:model.live="historyDateTo" />
                    </div>
                    <div class="setel-users-filter-field">
                        <label class="setel-users-filter-label" for="hist-status">Estado cierre</label>
                        <select id="hist-status" class="setel-input w-full py-0 pe-8" wire:model.live="historyAssignmentStatus">
                            <option value="">Todos</option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $assignmentStatusCases; $__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 flex items-end">
                        <button type="button" class="setel-btn-secondary h-[2.5rem] w-full px-4 text-sm" wire:click="resetHistoryFilters">Limpiar filtros</button>
                    </div>
                    <div class="setel-users-filter-field">
                        <label class="setel-users-filter-label" for="hist-per">Por página</label>
                        <select id="hist-per" class="setel-input w-full py-0 pe-8" wire:model.live="historyPerPage">
                            <option value="15">15</option>
                            <option value="25">25</option>
                            <option value="50">50</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="setel-table-wrap max-w-full overflow-x-auto px-5 py-4" wire:loading.class="opacity-60">
                <table class="setel-table min-w-[1100px]">
                    <thead>
                        <tr>
                            <th>Fecha día</th>
                            <th>Proyecto</th>
                            <th>OT</th>
                            <th>Sitio</th>
                            <th>Tipo</th>
                            <th>Técnico</th>
                            <th>Coordinador</th>
                            <th class="text-center">Estado</th>
                            <th class="text-center">Asignación</th>
                            <th class="text-center">Cierre</th>
                            <th>NOC (cierre)</th>
                            <th class="w-[90px] text-center">Ver</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->assignmentHistory; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__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'] = 'hist-asg-'.e($row->id).''; ?>wire:key="hist-asg-<?php echo e($row->id); ?>">
                                <td class="text-sm tabular-nums text-[var(--setel-text)]"><?php echo e($row->assigned_on?->format('d/m/Y')); ?></td>
                                <td class="text-sm text-[var(--setel-text-muted)]"><?php echo e($row->work?->site?->project?->name ?? '—'); ?></td>
                                <td class="font-mono text-sm font-semibold"><?php echo e($row->work?->ot ?? '—'); ?></td>
                                <td class="text-sm"><?php echo e($row->work?->site?->code ?? '—'); ?></td>
                                <td class="text-sm text-[var(--setel-text-muted)]"><?php echo e(\Illuminate\Support\Str::limit((string) ($row->work?->workType?->name ?? ''), 28)); ?></td>
                                <td class="text-sm"><?php echo e($row->technician?->fullName() ?? '—'); ?></td>
                                <td class="text-sm"><?php echo e($row->coordinator?->fullName() ?? '—'); ?></td>
                                <td class="text-center">
                                    <span class="setel-badge setel-badge--neutral text-xs">
                                        <?php echo e(WorkAssignmentStatus::tryFrom((string) $row->status)?->label() ?? $row->status); ?>

                                    </span>
                                </td>
                                <td class="text-center text-xs tabular-nums text-[var(--setel-text-muted)]"><?php echo e($row->assigned_at?->format('d/m H:i') ?? '—'); ?></td>
                                <td class="text-center text-xs tabular-nums text-[var(--setel-text-muted)]"><?php echo e($row->closed_at?->format('d/m H:i') ?? '—'); ?></td>
                                <td class="text-sm text-[var(--setel-text-muted)]"><?php echo e($row->noc?->fullName() ?? '—'); ?></td>
                                <td class="text-center">
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($row->work): ?>
                                        <button type="button" class="setel-btn-secondary px-2 py-1 text-xs" wire:click="openWorkPreview(<?php echo e($row->work->id); ?>)">Ver</button>
                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </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="12" class="py-12 text-center text-sm text-[var(--setel-text-muted)]">Sin registros para los filtros.</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->assignmentHistory->hasPages()): ?>
                <div class="border-t border-[var(--setel-card-border)] px-5 py-4">
                    <?php echo e($this->assignmentHistory->links()); ?>

                </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
    </div>

    <?php if (isset($component)) { $__componentOriginal8cc9d3143946b992b324617832699c5f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8cc9d3143946b992b324617832699c5f = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::modal.index','data' => ['wire:model.self' => 'showWorkPreviewModal','wire:close' => 'closeWorkPreview','class' => 'max-w-2xl w-full !max-w-[min(96vw,42rem)]']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::modal'); ?>
<?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(['wire:model.self' => 'showWorkPreviewModal','wire:close' => 'closeWorkPreview','class' => 'max-w-2xl w-full !max-w-[min(96vw,42rem)]']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->previewWork): ?>
            <div class="flex max-h-[min(85vh,640px)] flex-col gap-4">
                <div class="flex items-start gap-3 pe-10">
                    <span class="setel-modal__icon shrink-0 !static !flex"><?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-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-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; ?></span>
                    <div class="min-w-0">
                        <?php if (isset($component)) { $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::heading','data' => ['size' => 'lg']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::heading'); ?>
<?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(['size' => 'lg']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Resumen · <?php echo e($this->previewWork->ot); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $attributes = $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $component = $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
                        <?php if (isset($component)) { $__componentOriginal43e8c568bbb8b06b9124aad3ccf4ec97 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal43e8c568bbb8b06b9124aad3ccf4ec97 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::subheading','data' => ['class' => 'mt-1']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::subheading'); ?>
<?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' => 'mt-1']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Vista rápida para decidir asignación. Los datos completos están en la ficha. <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal43e8c568bbb8b06b9124aad3ccf4ec97)): ?>
<?php $attributes = $__attributesOriginal43e8c568bbb8b06b9124aad3ccf4ec97; ?>
<?php unset($__attributesOriginal43e8c568bbb8b06b9124aad3ccf4ec97); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal43e8c568bbb8b06b9124aad3ccf4ec97)): ?>
<?php $component = $__componentOriginal43e8c568bbb8b06b9124aad3ccf4ec97; ?>
<?php unset($__componentOriginal43e8c568bbb8b06b9124aad3ccf4ec97); ?>
<?php endif; ?>
                    </div>
                </div>

                <div class="min-h-0 flex-1 space-y-4 overflow-y-auto border-t border-[var(--setel-card-border)] pt-4 pe-1">
                    <dl class="grid gap-3 sm:grid-cols-2">
                        <div class="sm:col-span-2">
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Sitio</dt>
                            <dd class="mt-1 text-sm text-[var(--setel-text)]"><?php echo e($this->previewWork->site?->code); ?> · <?php echo e($this->previewWork->site?->name ?? '—'); ?></dd>
                        </div>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->previewWork->site?->project): ?>
                            <div class="sm:col-span-2">
                                <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Proyecto</dt>
                                <dd class="mt-1 flex items-center gap-2 text-sm text-[var(--setel-text)]">
                                    <span class="size-3 shrink-0 rounded-full border border-[var(--setel-card-border)]" style="background-color: <?php echo e($this->previewWork->site->project->color ?? '#64748b'); ?>"></span>
                                    <?php echo e($this->previewWork->site->project->name); ?>

                                </dd>
                            </div>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        <div>
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Tipo</dt>
                            <dd class="mt-1 text-sm"><?php echo e($this->previewWork->workType?->name ?? '—'); ?></dd>
                        </div>
                        <div>
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Prioridad</dt>
                            <dd class="mt-1"><span class="<?php echo e(WorkPriority::tryFrom($this->previewWork->priority)?->badgeClass() ?? 'setel-badge setel-badge--neutral'); ?> text-xs"><?php echo e(WorkPriority::tryFrom($this->previewWork->priority)?->label() ?? $this->previewWork->priority); ?></span></dd>
                        </div>
                        <div>
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Estado externo</dt>
                            <dd class="mt-1"><span class="<?php echo e(WorkStatus::tryFrom($this->previewWork->work_status)?->badgeClass() ?? 'setel-badge setel-badge--neutral'); ?> text-xs"><?php echo e(WorkStatus::tryFrom($this->previewWork->work_status)?->label() ?? $this->previewWork->work_status); ?></span></dd>
                        </div>
                        <div>
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Estado interno</dt>
                            <dd class="mt-1"><span class="<?php echo e(WorkInternalStatus::tryFrom($this->previewWork->internal_status)?->badgeClass() ?? 'setel-badge setel-badge--neutral'); ?> text-xs"><?php echo e(WorkInternalStatus::tryFrom($this->previewWork->internal_status)?->label() ?? $this->previewWork->internal_status); ?></span></dd>
                        </div>
                        <div>
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">SLA (h)</dt>
                            <dd class="mt-1 text-sm tabular-nums"><?php echo e(number_format($this->previewWork->sla_hours)); ?></dd>
                        </div>
                        <div>
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Escala</dt>
                            <dd class="mt-1 text-sm tabular-nums"><?php echo e($this->previewWork->scale_datetime?->format('d/m/Y H:i') ?? '—'); ?></dd>
                        </div>
                        <div>
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Programado</dt>
                            <dd class="mt-1 text-sm tabular-nums"><?php echo e($this->previewWork->scheduled_date?->format('d/m/Y H:i') ?? '—'); ?></dd>
                        </div>
                        <div class="sm:col-span-2">
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Equipo en OT</dt>
                            <dd class="mt-2 grid gap-2 text-sm sm:grid-cols-3">
                                <div><span class="text-[var(--setel-text-muted)]">NOC</span><br /><span class="font-medium"><?php echo e($this->previewWork->noc?->fullName() ?? '—'); ?></span></div>
                                <div><span class="text-[var(--setel-text-muted)]">Técnico</span><br /><span class="font-medium"><?php echo e($this->previewWork->technician?->fullName() ?? '—'); ?></span></div>
                                <div><span class="text-[var(--setel-text-muted)]">Coord.</span><br /><span class="font-medium"><?php echo e($this->previewWork->coordinator?->fullName() ?? '—'); ?></span></div>
                            </dd>
                        </div>
                        <div class="sm:col-span-2">
                            <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Seguimiento NOC</dt>
                            <dd class="mt-1 flex flex-wrap items-center gap-2">
                                <span class="<?php echo e(NocTrackingStatus::tryFrom((string) ($this->previewWork->noc_tracking_status ?? ''))?->badgeClass() ?? 'setel-badge setel-badge--neutral'); ?> text-xs">
                                    <?php echo e(NocTrackingStatus::tryFrom((string) ($this->previewWork->noc_tracking_status ?? ''))?->label() ?? ($this->previewWork->noc_tracking_status ?? '—')); ?>

                                </span>
                            </dd>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->previewWork->noc_comment): ?>
                                <p class="mt-2 text-sm leading-relaxed text-[var(--setel-text-muted)]"><?php echo e($this->previewWork->noc_comment); ?></p>
                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        </div>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->previewWork->observation): ?>
                            <div class="sm:col-span-2">
                                <dt class="text-xs font-semibold uppercase tracking-wide text-[var(--setel-text-muted)]">Observaciones</dt>
                                <dd class="mt-1 text-sm leading-relaxed text-[var(--setel-text-muted)]"><?php echo e($this->previewWork->observation); ?></dd>
                            </div>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </dl>
                </div>

                <div class="flex flex-wrap justify-end gap-2 border-t border-[var(--setel-card-border)] pt-4">
                    <?php if (isset($component)) { $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::button.index','data' => ['type' => 'button','variant' => 'ghost','wire:click' => 'closeWorkPreview']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::button'); ?>
<?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(['type' => 'button','variant' => 'ghost','wire:click' => 'closeWorkPreview']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Cerrar <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $attributes = $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $component = $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
                    <a href="<?php echo e(route('works.show', $this->previewWork)); ?>" wire:navigate class="setel-btn-primary inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium">Abrir ficha completa</a>
                </div>
            </div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $attributes = $__attributesOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__attributesOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $component = $__componentOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__componentOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>

    <?php
        $assignConfirmCount = $assignSubTab === 'lote' ? count($selectedWorkIds) : count($selectedUnassignWorkIds);
        $assignConfirmOtWord = $assignConfirmCount === 1 ? 'OT' : 'OTs';
        $assignConfirmTitle = $assignSubTab === 'lote' ? 'Confirmar asignación' : 'Confirmar reasignación';
        $assignConfirmTl = e($this->assignConfirmTechnicianLabel);
        $assignConfirmDay = e($this->todayIso);
        $strongOpen = '<strong class="text-[var(--setel-text)]">';
        $strongClose = '</strong>';
        if ($assignSubTab === 'lote') {
            $assignConfirmBody = 'Se asignará '.$strongOpen.$assignConfirmCount.$strongClose
                .' '.$assignConfirmOtWord.' al técnico '.$strongOpen.$assignConfirmTl.$strongClose
                .' para la fecha <span class="font-mono">'.$assignConfirmDay.'</span>.';
        } else {
            $assignConfirmSuf = $assignConfirmCount === 1 ? '' : 's';
            $assignConfirmBody = 'Se reasignará '.$strongOpen.$assignConfirmCount.$strongClose
                .' '.$assignConfirmOtWord.' seleccionada'.$assignConfirmSuf.' al técnico '.$strongOpen.$assignConfirmTl.$strongClose
                .' para la fecha <span class="font-mono">'.$assignConfirmDay.'</span> (trabajos de hoy).';
        }
    ?>
    <?php if (isset($component)) { $__componentOriginal8cc9d3143946b992b324617832699c5f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8cc9d3143946b992b324617832699c5f = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::modal.index','data' => ['wire:model.self' => 'showAssignConfirmModal','wire:close' => 'cancelAssignConfirm','class' => 'max-w-md w-full !max-w-md']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::modal'); ?>
<?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(['wire:model.self' => 'showAssignConfirmModal','wire:close' => 'cancelAssignConfirm','class' => 'max-w-md w-full !max-w-md']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

        <div class="flex flex-col gap-4">
            <?php if (isset($component)) { $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::heading','data' => ['size' => 'lg']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::heading'); ?>
<?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(['size' => 'lg']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
<?php echo e($assignConfirmTitle); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $attributes = $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $component = $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
            <p class="text-sm text-[var(--setel-text-muted)]"><?php echo $assignConfirmBody; ?></p>
            <div class="flex flex-wrap justify-end gap-2 border-t border-[var(--setel-card-border)] pt-4">
                <?php if (isset($component)) { $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::button.index','data' => ['type' => 'button','variant' => 'ghost','wire:click' => 'cancelAssignConfirm']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::button'); ?>
<?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(['type' => 'button','variant' => 'ghost','wire:click' => 'cancelAssignConfirm']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Cancelar <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $attributes = $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $component = $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
                <?php if (isset($component)) { $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::button.index','data' => ['type' => 'button','variant' => 'primary','wire:click' => 'confirmAssignSelection','wire:loading.attr' => 'disabled','wire:target' => 'confirmAssignSelection']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::button'); ?>
<?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(['type' => 'button','variant' => 'primary','wire:click' => 'confirmAssignSelection','wire:loading.attr' => 'disabled','wire:target' => 'confirmAssignSelection']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

                    <span wire:loading.remove wire:target="confirmAssignSelection">Confirmar</span>
                    <span wire:loading wire:target="confirmAssignSelection">Guardando…</span>
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $attributes = $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $component = $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
            </div>
        </div>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $attributes = $__attributesOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__attributesOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $component = $__componentOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__componentOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>

    <?php if (isset($component)) { $__componentOriginal8cc9d3143946b992b324617832699c5f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8cc9d3143946b992b324617832699c5f = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::modal.index','data' => ['wire:model.self' => 'showCloseDayConfirmModal','wire:close' => 'cancelCloseDayConfirm','class' => 'max-w-md w-full !max-w-md']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::modal'); ?>
<?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(['wire:model.self' => 'showCloseDayConfirmModal','wire:close' => 'cancelCloseDayConfirm','class' => 'max-w-md w-full !max-w-md']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

        <div class="flex flex-col gap-4">
            <?php if (isset($component)) { $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::heading','data' => ['size' => 'lg']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::heading'); ?>
<?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(['size' => 'lg']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Cerrar trabajos del día <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $attributes = $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $component = $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
            <p class="text-sm text-[var(--setel-text-muted)]">
                Se cerrarán todas las asignaciones abiertas de <strong class="text-[var(--setel-text)]"><?php echo e($this->todayIso); ?></strong>. El estado de cada fila dependerá del estado interno de la OT al momento del cierre.
            </p>
            <div class="flex flex-wrap justify-end gap-2 border-t border-[var(--setel-card-border)] pt-4">
                <?php if (isset($component)) { $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::button.index','data' => ['type' => 'button','variant' => 'ghost','wire:click' => 'cancelCloseDayConfirm']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::button'); ?>
<?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(['type' => 'button','variant' => 'ghost','wire:click' => 'cancelCloseDayConfirm']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Cancelar <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $attributes = $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $component = $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
                <?php if (isset($component)) { $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::button.index','data' => ['type' => 'button','variant' => 'primary','wire:click' => 'confirmCloseDay','wire:loading.attr' => 'disabled','wire:target' => 'confirmCloseDay']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::button'); ?>
<?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(['type' => 'button','variant' => 'primary','wire:click' => 'confirmCloseDay','wire:loading.attr' => 'disabled','wire:target' => 'confirmCloseDay']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

                    <span wire:loading.remove wire:target="confirmCloseDay">Sí, cerrar</span>
                    <span wire:loading wire:target="confirmCloseDay">Cerrando…</span>
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $attributes = $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $component = $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
            </div>
        </div>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $attributes = $__attributesOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__attributesOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $component = $__componentOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__componentOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>

    <?php if (isset($component)) { $__componentOriginal8cc9d3143946b992b324617832699c5f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8cc9d3143946b992b324617832699c5f = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::modal.index','data' => ['wire:model.self' => 'showUnassignConfirmModal','wire:close' => 'cancelUnassignConfirm','class' => 'max-w-md w-full !max-w-md']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::modal'); ?>
<?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(['wire:model.self' => 'showUnassignConfirmModal','wire:close' => 'cancelUnassignConfirm','class' => 'max-w-md w-full !max-w-md']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

        <div class="flex flex-col gap-4">
            <?php if (isset($component)) { $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::heading','data' => ['size' => 'lg']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::heading'); ?>
<?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(['size' => 'lg']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Retirar del día <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $attributes = $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $component = $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
            <p class="text-sm text-[var(--setel-text-muted)]">
                Se retirará la asignación abierta de hoy para <strong class="text-[var(--setel-text)]"><?php echo e($this->bulkUnassignOts->count()); ?></strong>
                <?php echo e($this->bulkUnassignOts->count() === 1 ? 'OT' : 'OTs'); ?>:
            </p>
            <ul class="max-h-40 list-inside list-disc overflow-y-auto text-sm text-[var(--setel-text)]">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $this->bulkUnassignOts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ot): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <li class="font-mono"><?php echo e($ot); ?></li>
                <?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; ?>
            </ul>
            <p class="text-xs text-[var(--setel-text-muted)]">Si el técnico en la ficha coincide con la asignación, se limpiará para poder elegir otro.</p>
            <div class="flex flex-wrap justify-end gap-2 border-t border-[var(--setel-card-border)] pt-4">
                <?php if (isset($component)) { $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::button.index','data' => ['type' => 'button','variant' => 'ghost','wire:click' => 'cancelUnassignConfirm']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::button'); ?>
<?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(['type' => 'button','variant' => 'ghost','wire:click' => 'cancelUnassignConfirm']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Cancelar <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $attributes = $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $component = $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
                <?php if (isset($component)) { $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::button.index','data' => ['type' => 'button','variant' => 'primary','wire:click' => 'confirmBulkUnassignFromToday','wire:loading.attr' => 'disabled','wire:target' => 'confirmBulkUnassignFromToday']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::button'); ?>
<?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(['type' => 'button','variant' => 'primary','wire:click' => 'confirmBulkUnassignFromToday','wire:loading.attr' => 'disabled','wire:target' => 'confirmBulkUnassignFromToday']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

                    <span wire:loading.remove wire:target="confirmBulkUnassignFromToday">Sí, quitar</span>
                    <span wire:loading wire:target="confirmBulkUnassignFromToday">Quitando…</span>
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $attributes = $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $component = $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
            </div>
        </div>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $attributes = $__attributesOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__attributesOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $component = $__componentOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__componentOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>

    <?php if (isset($component)) { $__componentOriginal8cc9d3143946b992b324617832699c5f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8cc9d3143946b992b324617832699c5f = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::modal.index','data' => ['wire:model.self' => 'showHelpModal','wire:close' => 'closeHelpModal','class' => 'max-w-lg w-full !max-w-[min(96vw,32rem)]']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::modal'); ?>
<?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(['wire:model.self' => 'showHelpModal','wire:close' => 'closeHelpModal','class' => 'max-w-lg w-full !max-w-[min(96vw,32rem)]']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

        <div class="flex max-h-[min(80vh,520px)] flex-col gap-4">
            <?php if (isset($component)) { $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::heading','data' => ['size' => 'lg']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::heading'); ?>
<?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(['size' => 'lg']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Cómo usar asignaciones <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $attributes = $__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__attributesOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9)): ?>
<?php $component = $__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9; ?>
<?php unset($__componentOriginale0fd5b6a0986beffac17a0a103dfd7b9); ?>
<?php endif; ?>
            <div class="min-h-0 flex-1 space-y-4 overflow-y-auto text-sm text-[var(--setel-text-muted)]">
                <p><strong class="text-[var(--setel-text)]">Día de operación.</strong> Todas las acciones de la pestaña Asignar aplican a la fecha de hoy que se muestra arriba.</p>
                <p><strong class="text-[var(--setel-text)]">Asignar.</strong> En <em>Lotes por asignar</em> marque OT, elija técnico y confirme. Los filtros van en orden: proyecto y luego tipo de trabajo.</p>
                <p><strong class="text-[var(--setel-text)]">Trabajos de hoy.</strong> Lista de OT ya asignadas hoy; seleccione una o varias y use <em>Retirar del día (selección)</em>. Para solo cambiar de técnico, use <em>Lotes por asignar</em> y vuelva a asignar.</p>
                <p><strong class="text-[var(--setel-text)]">Horario.</strong> Coordinar (asignar / retirar) solo entre <em><?php echo e(config('work_coordination.operations_start')); ?></em> y <em><?php echo e(config('work_coordination.operations_end')); ?></em> (zona <?php echo e(config('app.timezone')); ?>). <strong>Cerrar trabajos</strong> solo entre <em><?php echo e(config('work_coordination.close_button_from')); ?></em> y el fin de esa ventana.</p>
                <p><strong class="text-[var(--setel-text)]">Historial.</strong> Por defecto solo hoy; filtre en orden proyecto → tipo → sitio → fechas.</p>
            </div>
            <div class="flex justify-end border-t border-[var(--setel-card-border)] pt-4">
                <?php if (isset($component)) { $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::button.index','data' => ['type' => 'button','variant' => 'primary','wire:click' => 'closeHelpModal']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::button'); ?>
<?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(['type' => 'button','variant' => 'primary','wire:click' => 'closeHelpModal']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
Entendido <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $attributes = $__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__attributesOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580)): ?>
<?php $component = $__componentOriginalc04b147acd0e65cc1a77f86fb0e81580; ?>
<?php unset($__componentOriginalc04b147acd0e65cc1a77f86fb0e81580); ?>
<?php endif; ?>
            </div>
        </div>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $attributes = $__attributesOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__attributesOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8cc9d3143946b992b324617832699c5f)): ?>
<?php $component = $__componentOriginal8cc9d3143946b992b324617832699c5f; ?>
<?php unset($__componentOriginal8cc9d3143946b992b324617832699c5f); ?>
<?php endif; ?>
</div>
<?php /**PATH C:\laragon\www\setelsat-gilat-manager\resources\views\livewire\works\coordinator-assignments-index.blade.php ENDPATH**/ ?>