@foreach($shifts as $idx => $shift)
@php
$isMorning = str_contains(strtolower($shift->name), 'morning');
$rule = $employeeWorkRules[$shift->id] ?? null;
$isConfigured = $rule && $rule->is_active;
$defaultStart = $isMorning ? '07:45' : '12:35';
$defaultEnd = $isMorning ? '12:35' : '17:30';
$tabId = "shift_tab_{$shift->id}";
$schedulesMap = $rule ? $rule->weeklySchedules->keyBy('day_of_week') : collect();
$days = [
6 => 'Saturday',
0 => 'Sunday',
1 => 'Monday',
2 => 'Tuesday',
3 => 'Wednesday',
4 => 'Thursday',
5 => 'Friday'
];
@endphp
{{-- Hidden Shift Enable Form Input --}}
{{-- Shift Controls Header --}}
{{-- Shift Content Container --}}
{{-- Shift Disabled Overlay Placeholder --}}
@endforeach