@php
$svgArc = function ($cx, $cy, $r1, $r2, $startDeg, $endDeg, $pad = 1.2) {
$s = deg2rad($startDeg + $pad);
$e = deg2rad($endDeg - $pad);
$large = ($endDeg - $startDeg - 2 * $pad) > 180 ? 1 : 0;
$f = fn ($n) => round($n, 3);
return sprintf(
'M %s %s L %s %s A %s %s 0 %d 1 %s %s L %s %s A %s %s 0 %d 0 %s %s Z',
$f($cx + $r1 * cos($s)), $f($cy + $r1 * sin($s)),
$f($cx + $r2 * cos($s)), $f($cy + $r2 * sin($s)),
$f($r2), $f($r2), $large,
$f($cx + $r2 * cos($e)), $f($cy + $r2 * sin($e)),
$f($cx + $r1 * cos($e)), $f($cy + $r1 * sin($e)),
$f($r1), $f($r1), $large,
$f($cx + $r1 * cos($s)), $f($cy + $r1 * sin($s))
);
};
$midPoint = function ($cx, $cy, $r, $startDeg, $endDeg) {
$mid = deg2rad(($startDeg + $endDeg) / 2);
return [round($cx + $r * cos($mid), 1), round($cy + $r * sin($mid), 1)];
};
$cx = 200; $cy = 200;
$r1z = 62; $r2z = 132;
$r1e = 135; $r2e = 195;
$lrZ = 97; $lrE = 165;
$zoneAngles = [
'purple' => [-90, -30],
'blue' => [-30, 30],
'green' => [ 30, 90],
'yellow' => [ 90, 150],
'orange' => [150, 210],
'red' => [210, 270],
];
@endphp
{{-- Saved feedback --}}
{{ __('Your emotion has been saved.') }}
{{-- SVG Emotion Wheel --}}
{{-- Instruction --}}
{{ __('Tap a colour to start') }}
{{-- Zone selected: badge + back --}}
{{-- Step 2: Emotion pills --}}
{{ __('Select an emotion') }}
{{-- Step 3: Nuance pills --}}
{{ __('How exactly does it feel?') }}
{{-- Step 4: Need card + save --}}
{{-- History --}}
{{ __('Recent emotions') }}
{{ __('No emotions logged yet.') }}
{{-- end x-data --}}