@php
$fields = isset($offer) ? json_decode($offer->template_fields, true) : [];
// print_r($fields);exit;
@endphp
@php
$table_option = $fields['table_option'] ?? '';
@endphp
@php
$tableOption1Data = $fields['table_option1'] ?? [];
$tableOption2Data = $fields['table_option2'] ?? [];
$grandTotalOption1 = 0;
$grandTotalOption2 = 0;
@endphp
Option 1: Rate Per Night
Grand Total: {{ number_format($grandTotalOption1, 2) }}
Option 2: Rooms & Prices
Grand Total: {{ number_format($grandTotalOption2, 2) }}
@php
$sections = $fields['sections'] ?? [];
// print_r($sections);exit;
@endphp
@foreach ($sections as $index => $section)
@if ($index > 0)
@endif
@endforeach
@if (empty($sections))
{{-- Default empty block if no section exists --}}
@endif