{{-- Dangerous Objects Management — Actions section --}}
{{-- Timeline ("frise") of how a dangerous object is handled. Step 3 forks:
safe extraction and/or transmission to the PLC.
- xl+: horizontal track, cards alternate above/below it; the fork splits
the track into two lanes that join again before step 4.
- Below xl: vertical line on the left, nodes facing their card.
The markup renders the finished state; initDangerFrise() (gsap-animations.js)
draws the track and lights up each step as the visitor scrolls. --}}
@php
$data = __('solutions.dangerous_objects.actions');
$steps = $data['steps'];
$dir = 'images/solutions/dangerous_objects_management/';
// 'step' drives the highlight, 'place' is the xl grid cell (row 2 is the track)
$cards = [
['key' => 'detection', 'step' => 1, 'place' => 'xl:col-start-1 xl:row-start-1 xl:self-end',
'sources' => [$dir . 'real-time-detection-480.webp' => 480, $dir . 'real-time-detection.webp' => 644], 'height' => 485],
['key' => 'alert', 'step' => 2, 'place' => 'xl:col-start-2 xl:row-start-3 xl:self-start',
'sources' => [$dir . 'real-time-alert-480.webp' => 480, $dir . 'real-time-alert.webp' => 777], 'height' => 595],
['key' => 'extraction', 'step' => 3, 'place' => 'xl:col-start-3 xl:row-start-1 xl:self-end',
'sources' => ['images/by_pass.webp' => 585], 'height' => 567],
['key' => 'plc', 'step' => 3, 'place' => 'xl:col-start-3 xl:row-start-3 xl:self-start'],
['key' => 'traceability', 'step' => 4, 'place' => 'xl:col-start-4 xl:row-start-1 xl:self-end',
'sources' => [$dir . 'alert-dashboard-480.webp' => 480, $dir . 'alert-dashboard-960.webp' => 960], 'height' => 540],
];
// Track geometry, in viewBox units (1000 × 160): main line at y=80, lanes at y=36 / y=124
$paths = [
'in' => 'M0 80H470',
'up' => 'M470 80C530 80 530 36 590 36H660C720 36 720 80 780 80',
'down' => 'M470 80C530 80 530 124 590 124H660C720 124 720 80 780 80',
'out' => 'M780 80H1000',
];
$nodes = [
['step' => 1, 'x' => 125, 'y' => 80],
['step' => 2, 'x' => 375, 'y' => 80],
['step' => 3, 'x' => 625, 'y' => 36],
['step' => 3, 'x' => 625, 'y' => 124],
['step' => 4, 'x' => 875, 'y' => 80],
];
$flowIcons = ['monitor', 'server', 'zap'];
$outcomeIcons = ['trending-down', 'shield', 'file-bar-chart'];
$nodeClass = 'z-10 flex size-10 xl:size-11 shrink-0 items-center justify-center rounded-full border border-white/15 bg-background font-science-gothic text-sm text-muted-foreground transition-[background-color,border-color,color,box-shadow] duration-500 data-active:border-primary data-active:bg-primary data-active:text-white data-active:shadow-[0_0_24px_color-mix(in_oklab,var(--color-primary)_70%,transparent)]';
$chip = '' . e($data['branch_label']) . '';
@endphp
{{-- Vertical line (below xl) --}}
{{-- Faded end; the mask stays off the tip, which is wider than the rail --}}
{{-- Horizontal track (xl+) --}}
{{-- Travelling object: one head, split in two on the lanes --}}
@for($i = 0; $i < 2; $i++)
@endfor
{!! $chip !!}
@foreach($nodes as $node)
{{ sprintf('%02d', $node['step']) }}
@endforeach
{{-- Steps --}}
@foreach($cards as $card)
@php $step = $steps[$card['key']]; @endphp
{{-- Node facing the card (below xl); step 3 has a single node for both branches --}}
@if($card['key'] !== 'plc')
{{ sprintf('%02d', $card['step']) }}
@else
{{-- "and / or" between the two branches; the xl track shows it visually --}}