@if (($mode ?? false) == 'view')
    <label class="{{ $classLabel ?? 'light' }}" for="{{ $prefix ?? null }}address">{{ __('address') }}</label><br />
    @if ($item[($prefix ?? null) . 'address'])
        {{ $item[($prefix ?? null) . 'address'] ?? null }}<br />
    @endif
    @if ($item[($prefix ?? null) . 'address2'])
        {{ $item[($prefix ?? null) . 'address2'] ?? null }}
    @endif
    @if ($item[($prefix ?? null) . 'zipcode'])
        {{ $item[($prefix ?? null) . 'zipcode'] ?? null }}
    @endif
    @if ($item[($prefix ?? null) . 'city'])
        {{ $item[($prefix ?? null) . 'city'] ?? null }}
    @endif
    @if ($item[($prefix ?? null) . 'state'])
        {{ $item[($prefix ?? null) . 'state'] ?? null }}
    @endif
    @if ($item[($prefix ?? null) . 'country_id'])
        {{ $countries[$item[($prefix ?? null) . 'country_id']] ?? null }}<br />
    @endif
@else
    @if ($with_id ?? false)
        <input type="hidden" name="{{ ($prefix ?? null) . ($with_tab ?? false ? '[id]' : 'address_id') }}"
            value="{{ $with_id }}">
    @endif
    <div class="row mb-3">
        <div class="col-12">
            @include('components.form.input', [
                'label' => __('street'),
                'name' => ($prefix ?? null) . ($with_tab ?? false ? '[address]' : 'address'),
                'value' =>
                    $with_tab ?? false ? $item['address'] ?? null : $item[($prefix ?? null) . 'address'] ?? null,
                'disabled' => $disabled ?? false,
            ])
        </div>
        <div class="col-12">
            @include('components.form.input', [
                'label' => __('street_complement'),
                'name' => ($prefix ?? null) . ($with_tab ?? false ? '[address2]' : 'address2'),
                'value' =>
                    $with_tab ?? false ? $item['address2'] ?? null : $item[($prefix ?? null) . 'address2'] ?? null,
                'disabled' => $disabled ?? false,
            ])
        </div>
    </div>
    <div class="row mb-3">
        <div class="col-4">
            @include('components.form.input', [
                'label' => __('zipcode'),
                'name' => ($prefix ?? null) . ($with_tab ?? false ? '[zipcode]' : 'zipcode'),
                'value' =>
                    $with_tab ?? false ? $item['zipcode'] ?? null : $item[($prefix ?? null) . 'zipcode'] ?? null,
                'disabled' => $disabled ?? false,
            ])
        </div>
        <div class="col-8">
            @include('components.form.input', [
                'label' => __('city'),
                'name' => ($prefix ?? null) . ($with_tab ?? false ? '[city]' : 'city'),
                'value' => $with_tab ?? false ? $item['city'] ?? null : $item[($prefix ?? null) . 'city'] ?? null,
                'disabled' => $disabled ?? false,
            ])
        </div>
    </div>
    @if ($with_country ?? true)
        <div class="row mb-3">
            <div class="col-12 col-lg-6">
                @include('components.form.select', [
                    'label' => __('country'),
                    'name' => ($prefix ?? null) . ($with_tab ?? false ? '[country_id]' : 'country_id'),
                    'list' => $countries ?? null,
                    'value' =>
                        $with_tab ?? false
                            ? $item['country_id'] ?? null
                            : $item[($prefix ?? null) . 'country_id'] ?? null,
                    'with_empty' => '',
                    'required' => true,
                    'disabled' => $disabled ?? false,
                ])
            </div>
            <div class="col-12 col-lg-6">
                @include('components.form.input', [
                    'label' => 'state',
                    'name' => ($prefix ?? null) . ($with_tab ?? false ? '[state]' : 'state'),
                    'value' =>
                        $with_tab ?? false ? $item['state'] ?? null : $item[($prefix ?? null) . 'state'] ?? null,
                    'disabled' => $disabled ?? false,
                ])
            </div>
        </div>
    @endif
@endif
