@php
$address = !empty($config['form']['navbar']['address_p']['input']) ? $config['form']['navbar']['address_p']['input'] : null;
$addr = $data->address_p_default ?? [];
@endphp
@if (!empty($address))
@php
$cls_row = ['2' => 'col-lg-6', '4' => 'col-lg-3', '5' => 'col-lg-3'];
@endphp
@if ($addr)
@foreach ($address as $item => $item_v)
@if (is_numeric($item))
@php
$div_cls = $cls_row[count($item_v)] ?? '';
@endphp
@foreach ($item_v as $k => $v)
@if (in_array($k, ['branch_code', 'branch_name']) && is_null($data->company_id))
@continue
@endif
@if (!empty($v['status']))
@php
if ($k == 'is_default') {
$val = $addr->{$k} == 1 ? __('member::member.default.yes') : __('member::member.default.no');
} else {
$val = $addr->{$k} ?? null;
}
@endphp
@endif
@endforeach
@else
@if (!empty($item_v['status']))
@endif
@endif
@endforeach
@else
@foreach ($address as $item => $item_v)
@if (is_numeric($item))
@php
$div_cls = $cls_row[count($item_v)] ?? '';
@endphp
@foreach ($item_v as $k => $v)
@if (in_array($k, ['branch_code', 'branch_name']) && is_null($data->company_id))
@continue
@endif
@if (!empty($v['status']))
@endif
@endforeach
@else
@if (!empty($item_v['status']))
@endif
@endif
@endforeach
@endif
@endif