@php use App\Utilities\Currency\CurrencyAccessor; @endphp @props([ 'reportLoaded' => false, 'summaryData' => [], 'targetLabel' => null, ])
@if($reportLoaded)
@foreach($summaryData as $summary)
{{ $summary['label'] }}
@php $isTargetLabel = $summary['label'] === $targetLabel; $isPositive = money($summary['value'], CurrencyAccessor::getDefaultCurrency())->isPositive(); @endphp $isTargetLabel && $isPositive, 'text-danger-700 dark:text-danger-400' => $isTargetLabel && ! $isPositive, ]) > {{ $summary['value'] }}
@if(! $loop->last)
{{ $loop->remaining === 1 ? '=' : '-' }}
@endif @endforeach
@endif