@foreach ($contact as $k_c => $c)
@if (empty($c['status']) && !is_array($c))
@continue
@endif
{{-- New repeater pattern (multiple) --}}
@if (!empty($c['multiple']))
@php
$label = __("field.{$k_c}");
$values = $data->{$k_c} ?? [];
if (is_string($values)) $values = json_decode($values, true) ?? [$values];
if (empty($values)) $values = [''];
@endphp
{{-- Legacy row_ pattern --}}
@elseif (str_contains($k_c, 'row_'))
@if (empty($c['status']))
@continue
@endif
@foreach ($c as $k_i => $i)
@if (empty($i['status']))
@continue
@endif
@php
$chk_req = !empty($i['validate']);
$label = __("field.{$k_i}");
@endphp
@if (in_array($i['type'], ['mail', 'tel']))
@endif
@endforeach
{{-- Standard single field --}}
@else
@if (empty($c['status']))
@continue
@endif
@php
$chk_req = !empty($c['validate']);
$label = __("field.{$k_c}");
@endphp
@if (in_array($c['type'], ['text', 'mail', 'tel', 'input']))
@endif
@endif
@endforeach