@isset($article)
    @method('PUT')
    <input type="hidden" value="{{ $article->id }}" name="id">
@endisset
@csrf
<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.title') }}</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 }}[title]"
                                class="form-control form-control-lg form-control-solid mb-3 mb-lg-0"
                                placeholder="{{ __('lang.title') }}"
                                value="{{ old($name . '.title', isset($article) ? $article->translateOrNew($name)->title : '') }}">
                        </div>
                        <!--end::Col-->
                    </div>
                    <!--end::Row-->
                </div>
                <!--end::Col-->
            </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.description') }}</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">
                            <textarea name="{{ $name }}[description]" class="mb-3 mb-lg-0 summernote"
                                placeholder="{{ __('lang.description') }}">{{ old($name . '.description', isset($article) ? $article->translateOrNew($name)->description : '') }}</textarea>

                        </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">
    @php
        if (isset($article)) {
            $model = $article;
        } else {
            $model = new \App\Models\Article();
        }
    @endphp
    <x-image :model="$model" label='image'>
    </x-image>
</div>
