@isset($area)
    @method('PUT')
    <input type="hidden" value="{{ $area->id }}" name="id">
@endisset
@csrf
@php
    if (isset($area)) {
        $model = $area;
    } else {
        $model = new \App\Models\Area();
    }
@endphp
<x-localization>
    @foreach (LaravelLocalization::getSupportedLocales() as $name => $value)
        <div class="tab-pane fade {{ LaravelLocalization::getCurrentLocale() == $name ? 'show active' : '' }}"
            id="{{ $name }}" role="tabpanel" aria-labelledby="{{ $name }}-tab">

            <!--begin::Input group-->
            <div class="row mb-3">
                <!--begin::Label-->
                <label class="col-lg-4 col-form-label required fw-semibold fs-6">{{ __('lang.name') }}</label>
                <!--end::Label-->

                <!--begin::Col-->
                <div class="col-lg-8">
                    <!--begin::Row-->
                    <div class="row">
                        <!--begin::Col-->
                        <div class="col-lg-12 fv-row fv-plugins-icon-container">
                            <input type='text' name="{{ $name }}[name]"
                                class="form-control form-control-lg form-control-solid mb-3 mb-lg-0 "
                                placeholder="{{ __('lang.name') }}"
                                value="{{ old($name . '.name', isset($area) ? $area->translateOrNew($name)->name : '') }}">
                        </div>
                        <!--end::Col-->
                    </div>
                    <!--end::Row-->
                </div>
                <!--end::Col-->
            </div>
            <!--end::Input group-->
        </div>
    @endforeach
</x-localization>

<div class="card-body border-top p-9">
    <!--begin::Input group-->
    <div class="row mb-3">
        <!--begin::Label-->
        <label class="col-lg-4 col-form-label required fw-semibold fs-6">{{ __('lang.country') }}</label>
        <!--end::Label-->


        <!--begin::Col-->
        <x-country-select :model="$model"></x-country-select> <!--end::Col-->

        <!--end::Row-->
    </div>

    <!--end::Input group-->



    <!--begin::Input group-->
    <div class="row mb-3">
        <!--begin::Label-->
        <label class="col-lg-4 col-form-label required fw-semibold fs-6">{{ __('lang.city') }}</label>
        <!--end::Label-->


        <!--begin::Col-->
        <x-city-select :model="$model"
            countryId="{{ old('country_id', $model ? $model->country_id : '') }}"></x-city-select>



    </div>
</div><!--end::Row-->
