@php
$opArr = is_array($opcoesLinha ?? null) ? $opcoesLinha : [];
$lista = is_array($opArr['adicionais'] ?? null) ? $opArr['adicionais'] : [];
$obsItem = trim((string) ($opArr['observacao'] ?? ''));
$notaItem = (int) ($opArr['nota_produto'] ?? 0);
@endphp
@if ($lista !== [] || $obsItem !== '' || ($notaItem >= 1 && $notaItem <= 5))
@if ($notaItem >= 1 && $notaItem <= 5)
@for ($i = 1; $i <= 5; $i++)
@endfor
@endif
@if ($obsItem !== '')
Obs.: {{ $obsItem }}
@endif
@if ($lista !== [])
@foreach ($lista as $op)
-
@if (($op['tipo'] ?? '') === \App\Models\Adicional::TIPO_RETIRAR || ($op['tipo'] ?? '') === 'retirar_ingrediente')
@php $qRet = (int) ($op['quantidade'] ?? 1); @endphp
{{ $op['nome'] ?? '' }}@if ($qRet > 1) ×{{ $qRet }}@endif
@else
@php $qOp = (int) ($op['quantidade'] ?? 1); @endphp
{{ $op['nome'] ?? '' }}@if ($qOp > 1) ×{{ $qOp }}@endif
@if ((float) ($op['preco'] ?? 0) > 0)
(+ R$ {{ number_format((float) $op['preco'] * max(1, $qOp), 2, ',', '.') }})
@endif
@endif
@endforeach
@endif
@endif