@php $intl = trim((string) ($config['estimated_intl'] ?? '')); $intlLabel = trim((string) ($config['estimated_intl_label'] ?? '')); $local = trim((string) ($config['estimated_local'] ?? '')); $localLabel = trim((string) ($config['estimated_local_label'] ?? '')); $returnIn = trim((string) ($config['return_within'] ?? '')); $returnTxt = trim((string) ($config['return_text'] ?? '')); $hasDelivery = $intl !== '' || $local !== ''; $hasReturn = $returnIn !== ''; // Compose the delivery sentence server-side. Avoids fragile inline // @if/@endif chains in the markup that confuse Blade's line-based parser. $deliveryParts = []; if ($intl !== '') { $part = '' . e($intl) . ''; if ($intlLabel !== '') { $part .= ' (' . e($intlLabel) . ')'; } $deliveryParts[] = $part; } if ($local !== '') { $part = '' . e($local) . ''; if ($localLabel !== '') { $part .= ' (' . e($localLabel) . ')'; } $deliveryParts[] = $part; } $deliverySentence = implode(', ', $deliveryParts); @endphp @if ($hasDelivery || $hasReturn)
@if ($hasDelivery)

{{ __('Estimated Delivery:') }} {!! $deliverySentence !!}

@endif @if ($hasReturn)

{{ __('Return within') }} {{ $returnIn }} @if ($returnTxt !== '') {{ $returnTxt }} @endif

@endif
@endif