@extends('admin.layouts.container')

@section('content')
<div class="side-title">
    <h3>{{$head ?? '' }}</h3>
</div>
<div class="border-item">
    <form class="form-row" method="post" action="{{ $action }}">
        @if($landing ?? ''  && $landing->id)
            @method('PUT')
        @endif
        @csrf

{{--            <div class="form-group col-lg-6">--}}
{{--                <label>{{ meta('app_store_link', $local) ?? __('landings.app_store_link') }} </label>--}}
{{--                <input type="text" class="form-control {{ $errors->has('app_store_link') ? 'is-invalid' : '' }}" name="app_store_link" placeholder="{{ meta('app_store_link', $local) ?? __('landings.app_store_link') }}" value='{{ old("app_store_link", $landing->app_store_link ?? "") }}'/>--}}
{{--            </div>--}}
{{--            <div class="form-group col-lg-6">--}}
{{--                <label>{{ meta('play_store_link', $local) ?? __('landings.play_store_link') }} </label>--}}
{{--                <input type="text" class="form-control {{ $errors->has('play_store_link') ? 'is-invalid' : '' }}" name="play_store_link" placeholder="{{ meta('play_store_link', $local) ?? __('landings.play_store_link') }}" value='{{ old("play_store_link", $landing->play_store_link ?? "") }}'/>--}}
{{--            </div>--}}
        @foreach($languages as $language)
                <div class="form-group col-lg-12">
                    <label>{{ meta('banner_description', $language->local) ?? __('landings.banner_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="banner_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('banner_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('banner_description', $language->local) ?? __('landings.banner_description') }}">{{ old("banner_description_{$language->local}", $landing[$language->local]->banner_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_2_description', $language->local) ?? __('landings.sec_2_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_2_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_2_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_2_description', $language->local) ?? __('landings.sec_2_description') }}">{{ old("sec_2_description_{$language->local}", $landing[$language->local]->sec_2_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_3_box_1_description', $language->local) ?? __('landings.sec_3_box_1_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_3_box_1_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_3_box_1_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_3_box_1_description', $language->local) ?? __('landings.sec_3_box_1_description') }}">{{ old("sec_3_box_1_description_{$language->local}", $landing[$language->local]->sec_3_box_1_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_3_box_2_description', $language->local) ?? __('landings.sec_3_box_2_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_3_box_2_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_3_box_2_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_3_box_2_description', $language->local) ?? __('landings.sec_3_box_2_description') }}">{{ old("sec_3_box_2_description_{$language->local}", $landing[$language->local]->sec_3_box_2_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_3_box_3_description', $language->local) ?? __('landings.sec_3_box_3_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_3_box_3_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_3_box_3_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_3_box_3_description', $language->local) ?? __('landings.sec_3_box_3_description') }}">{{ old("sec_3_box_3_description_{$language->local}", $landing[$language->local]->sec_3_box_3_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_3_box_4_description', $language->local) ?? __('landings.sec_3_box_4_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_3_box_4_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_3_box_4_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_3_box_4_description', $language->local) ?? __('landings.sec_3_box_4_description') }}">{{ old("sec_3_box_4_description_{$language->local}", $landing[$language->local]->sec_3_box_4_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_3_title', $language->local) ?? __('landings.sec_3_title') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <input type="text" class="form-control {{ $errors->has('sec_3_title_'.$language->local) ? 'is-invalid' : '' }}" name="sec_3_title_{{ $language->local }}" placeholder="{{ meta('sec_3_title', $language->local) ?? __('landings.sec_3_title') }}" value='{{ old("sec_3_title_{$language->local}", $landing[$language->local]->sec_3_title ?? "") }}'/>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_3_description', $language->local) ?? __('landings.sec_3_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_3_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_3_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_3_description', $language->local) ?? __('landings.sec_3_description') }}">{{ old("sec_3_description_{$language->local}", $landing[$language->local]->sec_3_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_4_title', $language->local) ?? __('landings.sec_4_title') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <input type="text" class="form-control {{ $errors->has('sec_4_title_'.$language->local) ? 'is-invalid' : '' }}" name="sec_4_title_{{ $language->local }}" placeholder="{{ meta('sec_4_title', $language->local) ?? __('landings.sec_4_title') }}" value='{{ old("sec_4_title_{$language->local}", $landing[$language->local]->sec_4_title ?? "") }}'/>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_4_description', $language->local) ?? __('landings.sec_4_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_4_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_4_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_4_description', $language->local) ?? __('landings.sec_4_description') }}">{{ old("sec_4_description_{$language->local}", $landing[$language->local]->sec_4_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_4_box_1_description', $language->local) ?? __('landings.sec_4_box_1_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_4_box_1_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_4_box_1_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_4_box_1_description', $language->local) ?? __('landings.sec_4_box_1_description') }}">{{ old("sec_4_box_1_description_{$language->local}", $landing[$language->local]->sec_4_box_1_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_4_box_2_description', $language->local) ?? __('landings.sec_4_box_2_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_4_box_2_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_4_box_2_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_4_box_2_description', $language->local) ?? __('landings.sec_4_box_2_description') }}">{{ old("sec_4_box_2_description_{$language->local}", $landing[$language->local]->sec_4_box_2_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_4_box_3_description', $language->local) ?? __('landings.sec_4_box_3_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_4_box_3_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_4_box_3_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_4_box_3_description', $language->local) ?? __('landings.sec_4_box_3_description') }}">{{ old("sec_4_box_3_description_{$language->local}", $landing[$language->local]->sec_4_box_3_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_4_box_4_description', $language->local) ?? __('landings.sec_4_box_4_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_4_box_4_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_4_box_4_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_4_box_4_description', $language->local) ?? __('landings.sec_4_box_4_description') }}">{{ old("sec_4_box_4_description_{$language->local}", $landing[$language->local]->sec_4_box_4_description ?? "") }}</textarea>
                </div>
                <div class="form-group col-lg-12">
                    <label>{{ meta('sec_5_description', $language->local) ?? __('landings.sec_5_description') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                    <textarea name="sec_5_description_{{ $language->local }}" class="form-control my-editor {{ $errors->has('sec_5_description_'.$language->local) ? 'is-invalid' : '' }}" placeholder="{{ meta('sec_5_description', $language->local) ?? __('landings.sec_5_description') }}">{{ old("sec_5_description_{$language->local}", $landing[$language->local]->sec_5_description ?? "") }}</textarea>
                </div>
        @endforeach

        <div class="text-center mt-5 col-12">
            <button class="butn"><span>{{ __('dashboard.save') }}</span></button>
        </div>
    </form>
</div>

@endsection
