<div class="row">
	<div class="col-md-8">
		<div class="row mb-3">
			<div class="col-6">
				{{ Form::label('name', 'Nom') }}
				@include('components.form.input', ['name' => 'name', 'value' => $variety['name'] ?? null, 'required' => true])
			</div>
			<div class="col-6">
				{{ Form::label('genre', 'Espèce') }}
				@include('components.form.select', [
					'name' => 'specie_id',
					'list' => $species,
					'value' => $variety['specie_id'] ?? null,
					'class' => 'select2 form-control',
					'with_empty' => '',
					'required' => false
				])
			</div>
		</div>

		<div class="row mb-3">
			<div class="col-12">
				{{ Form::label('tags', 'Tags') }}
				@include('components.form.selects.select-tree', [
					'name' => 'tags[]',
					'list' => $tags_list,
					'values' => $variety['tags'] ?? null,
					'class' => 'select2 form-control',
					'multiple' => true
				])
			</div>
		</div>

		<div class="row mb-3">
			<div class="col-12">
				{{ Form::label('description', 'Description') }}
				@include('components.form.textarea', [
					'name' => 'description',
					'value' => $variety['description'] ?? null,
					'class' => 'editor',
					'rows' => 5,
					'required' => false
				])		
			</div>
		</div>

		<div class="row mb-3">
			<div class="col-12">
				{{ Form::label('memo', 'Descriptif sachet') }}
				@include('components.form.textarea', [
					'name' => 'memo',
					'value' => $variety['memo'] ?? null,
					'class' => 'editor',
					'rows' => 5,
					'required' => false
				])		
			</div>
		</div>

		<div class="row mb-3">
			<div class="col-12">
				{{ Form::label('description', 'Son +') }}
				@include('components.form.textarea', [
					'name' => 'plus',
					'value' => $variety['plus'] ?? null,
					'class' => 'editor',
					'rows' => 5,
					'required' => false,
				])		
			</div>
		</div>

	</div>

	<div class="col-md-4">
		@include('components.uploader.widget', [
			'load_url' => route('Admin.Botanic.Varieties.getImages', ['id' => $variety['id'] ?? false]),
			'delete_url' => route('Admin.Botanic.Varieties.deleteImage'),
			'name' => 'images'
		])
	</div>

</div>

@include('components.save')

@include('load.form.appender')
@include('load.form.editor')
@include('load.form.save')
@include('load.form.select2')
@include('load.layout.chevron')
@include('boilerplate::load.fileinput')
@include('boilerplate::load.tinymce')

@push('js')
	<script>
		$(function() {
			initSelect2();
			initChevron();
			initEditor();
			initSaveForm();
		});
	</script>
@endpush