@php
// Función helper para obtener coordenadas de uñas
function getCoordenadasUña($tipoMano, $dedo) {
$coordenadas = [
'izquierda' => [
'indice' => ['x' => 639, 'y' => 535, 'width' => 100, 'height' => 230, 'transform' => 'rotate(175, 650, 555)'],
'medio' => ['x' => 656, 'y' => 678, 'width' => 110, 'height' => 230, 'transform' => 'rotate(162, 615, 687.5)'],
'anular' => ['x' => 520, 'y' => 380, 'width' => 110, 'height' => 230, 'transform' => 'rotate(156, 467.5, 605)'],
'meñique' => ['x' => 665, 'y' => 376, 'width' => 88, 'height' => 190, 'transform' => 'rotate(156, 467.5, 605)'],
'menique' => ['x' => 665, 'y' => 376, 'width' => 88, 'height' => 190, 'transform' => 'rotate(156, 467.5, 605)'],
'pulgar' => ['x' => 613, 'y' => 465, 'width' => 140, 'height' => 230, 'transform' => 'rotate(-80, 685, 625)'],
],
'derecha' => [
'indice' => ['x' => 40, 'y' => 510, 'width' => 100, 'height' => 230, 'transform' => 'rotate(175, 350, 555)'],
'medio' => ['x' => 205, 'y' => 608, 'width' => 110, 'height' => 230, 'transform' => 'rotate(162, 385, 687.5)'],
'anular' => ['x' => 645, 'y' => 405, 'width' => 110, 'height' => 230, 'transform' => 'rotate(156, 532.5, 605)'],
'meñique' => ['x' => 790, 'y' => 401, 'width' => 88, 'height' => 190, 'transform' => 'rotate(156, 532.5, 605)'],
'menique' => ['x' => 790, 'y' => 401, 'width' => 88, 'height' => 190, 'transform' => 'rotate(156, 532.5, 605)'],
'pulgar' => ['x' => 308, 'y' => 830, 'width' => 140, 'height' => 230, 'transform' => 'rotate(-80, 315, 625)'],
]
];
return $coordenadas[$tipoMano][$dedo] ?? ['x' => 0, 'y' => 0, 'width' => 100, 'height' => 100, 'transform' => ''];
}
// Organizar opciones por tipo de mano/pie
$opcionesOrganizadas = $cita->citaOpcionesUnas->groupBy('tipo_mano');
@endphp
@php
// Definir el orden correcto para mostrar las cards
$ordenCorrecto = ['izquierda', 'derecha', 'pie_izquierdo', 'pie_derecho'];
@endphp
@foreach($ordenCorrecto as $tipoMano)
@if(isset($opcionesOrganizadas[$tipoMano]))
@php $opciones = $opcionesOrganizadas[$tipoMano]; @endphp
@if($tipoMano === 'izquierda' || $tipoMano === 'derecha')
@else
@endif
@foreach($opciones as $opcion)
{{ ucfirst($opcion->dedo) }}: {{ $opcion->servicio->nombre }}
@endforeach
@endif
@endforeach