<div class=" mt-3">
    <div class="row">
        <div class="col-12 col-md-6">
            <form action="/admin/settings/main" method="post">
                {{ csrf_field() }}
                <input type="hidden" name="name" value="home_hero">
                <input type="hidden" name="page" value="personalization">

                @if(!empty(getGeneralSettings('content_translate')))
                    <div class="form-group">
                        <label class="input-label">{{ trans('auth.language') }}</label>
                        <select name="locale" class="form-control js-edit-content-locale">
                            @foreach($userLanguages as $lang => $language)
                                <option value="{{ $lang }}" @if(mb_strtolower(request()->get('locale', (!empty($itemValue) and !empty($itemValue['locale'])) ? $itemValue['locale'] : app()->getLocale())) == mb_strtolower($lang)) selected @endif>{{ $language }}</option>
                            @endforeach
                        </select>
                        @error('locale')
                        <div class="invalid-feedback">
                            {{ $message }}
                        </div>
                        @enderror
                    </div>
                @else
                    <input type="hidden" name="locale" value="{{ getDefaultLocale() }}">
                @endif

                <div class="form-group">
                    <label>{{ trans('admin/main.title') }}</label>
                    <input type="text" name="value[title]" value="{{ (!empty($itemValue) and !empty($itemValue['title'])) ? $itemValue['title'] : old('title') }}" class="form-control " required/>
                </div>

                <div class="form-group">
                    <label>{{ trans('public.description') }}</label>
                    <textarea type="text" name="value[description]" rows="5" class="form-control " required>{{ (!empty($itemValue) and !empty($itemValue['description'])) ? $itemValue['description'] : old('description') }}</textarea>
                </div>

                <div class="form-group">
                    <label>{{ trans('public.button') }}</label>
                    <input type="text" name="value[button]" value="{{ (!empty($itemValue) and !empty($itemValue['button'])) ? $itemValue['button'] : old('button') }}" class="form-control " required/>
                </div>

                <div class="form-group">
                    <label>{{ trans('public.url') }}</label>
                    <input type="url" name="value[url]" value="{{ (!empty($itemValue) and !empty($itemValue['url'])) ? $itemValue['url'] : old('url') }}" class="form-control " required/>
                </div>

                <div class="form-group">
                    <label class="input-label">{{ trans('admin/main.hero_background') }}</label>
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <button type="button" class="input-group-text admin-file-manager" data-input="hero_background" data-preview="holder">
                                <i class="fa fa-chevron-up"></i>
                            </button>
                        </div>
                        <input type="text" name="value[hero_background]" id="hero_background" required value="{{ (!empty($itemValue) and !empty($itemValue['hero_background'])) ? $itemValue['hero_background'] : old('hero_background') }}" class="form-control"/>
                    </div>
                </div>
                <hr>

                <div class="form-group">
                    <label>{{ trans('admin/main.title') }} 2</label>
                    <input type="text" name="value[title2]" value="{{ (!empty($itemValue) and !empty($itemValue['title2'])) ? $itemValue['title2'] : old('title2') }}" class="form-control " required/>
                </div>

                <div class="form-group">
                    <label>{{ trans('public.description') }} 2</label>
                    <textarea type="text" name="value[description2]" rows="5" class="form-control " required>{{ (!empty($itemValue) and !empty($itemValue['description2'])) ? $itemValue['description2'] : old('description2') }}</textarea>
                </div>

                <div class="form-group">
                    <label>{{ trans('public.button') }} 2</label>
                    <input type="text" name="value[button2]" value="{{ (!empty($itemValue) and !empty($itemValue['button2'])) ? $itemValue['button2'] : old('button2') }}" class="form-control " required/>
                </div>

                <div class="form-group">
                    <label>{{ trans('public.url') }} 2</label>
                    <input type="url" name="value[url2]" value="{{ (!empty($itemValue) and !empty($itemValue['url2'])) ? $itemValue['url2'] : old('url2') }}" class="form-control " required/>
                </div>

                <div class="form-group">
                    <label class="input-label">{{ trans('admin/main.hero_background') }} 2</label>
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <button type="button" class="input-group-text admin-file-manager" data-input="hero_background2" data-preview="holder">
                                <i class="fa fa-chevron-up"></i>
                            </button>
                        </div>
                        <input type="text" name="value[hero_background2]" id="hero_background2" required value="{{ (!empty($itemValue) and !empty($itemValue['hero_background2'])) ? $itemValue['hero_background2'] : old('hero_background2') }}" class="form-control"/>
                    </div>
                </div>
                <hr>

                <div class="form-group">
                    <label>{{ trans('admin/main.title') }} 3</label>
                    <input type="text" name="value[title3]" value="{{ (!empty($itemValue) and !empty($itemValue['title3'])) ? $itemValue['title3'] : old('title3') }}" class="form-control " required/>
                </div>

                <div class="form-group">
                    <label>{{ trans('public.description') }} 3</label>
                    <textarea type="text" name="value[description3]" rows="5" class="form-control " required>{{ (!empty($itemValue) and !empty($itemValue['description3'])) ? $itemValue['description3'] : old('description3') }}</textarea>
                </div>

                <div class="form-group">
                    <label>{{ trans('public.button') }} 3</label>
                    <input type="text" name="value[button3]" value="{{ (!empty($itemValue) and !empty($itemValue['button3'])) ? $itemValue['button3'] : old('button3') }}" class="form-control " required/>
                </div>

                <div class="form-group">
                    <label>{{ trans('public.url') }} 3</label>
                    <input type="url" name="value[url3]" value="{{ (!empty($itemValue) and !empty($itemValue['url3'])) ? $itemValue['url3'] : old('url3') }}" class="form-control " required/>
                </div>

                <div class="form-group">
                    <label class="input-label">{{ trans('admin/main.hero_background') }} 3</label>
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <button type="button" class="input-group-text admin-file-manager" data-input="hero_background3" data-preview="holder">
                                <i class="fa fa-chevron-up"></i>
                            </button>
                        </div>
                        <input type="text" name="value[hero_background3]" id="hero_background3" required value="{{ (!empty($itemValue) and !empty($itemValue['hero_background3'])) ? $itemValue['hero_background3'] : old('hero_background3') }}" class="form-control"/>
                    </div>
                </div>
                <hr>

                <div class="form-group custom-switches-stacked">
                    <label class="custom-switch pl-0">
                        <input type="hidden" name="value[is_video_background]" value="0">
{{--                        <input type="checkbox" name="value[is_video_background]" id="isVideoBackground" value="1" {{ (!empty($itemValue) and !empty($itemValue['is_video_background']) and $itemValue['is_video_background']) ? 'checked="checked"' : '' }} class="custom-switch-input"/>--}}
{{--                        <span class="custom-switch-indicator"></span>--}}
{{--                        <label class="custom-switch-description mb-0 cursor-pointer" for="isVideoBackground">{{ trans('update.is_video_background') }}</label>--}}
                    </label>
{{--                    <div class="text-muted text-small mt-1">{{ trans('update.is_video_background_hint') }}</div>--}}

                </div>

                <button type="submit" class="btn btn-success">{{ trans('admin/main.save_change') }}</button>
            </form>
        </div>
    </div>
</div>
