<div class="row mb-3">
	<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' => $specie['name'] ?? null, 'required' => true])
			</div>
			<div class="col-6">
				{{ Form::label('latin', 'Nom latin') }}
				@include('components.form.input', ['name' => 'latin', 'value' => $specie['latin'] ?? null, 'required' => false])
			</div>
		</div>

		<div class="row mb-3">
			<div class="col-6">
				{{ Form::label('genre', 'Genre') }}
				@include('components.form.select', [
					'name' => 'genre_id',
					'list' => $genres,
					'value' => $specie['genre_id'] ?? null,
					'class' => 'select2',
					'with_empty' => '',
					'required' => false
				])
			</div>
			<div class="col-6">
				{{ Form::label('alias', 'Alias') }}
				@include('components.form.input', ['name' => 'alias', 'value' => $specie['alias'] ?? null])
			</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' => $specie['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' => $specie['description'] ?? null,
					'class' => 'editor',
					'required' => false
				])
			</div>
		</div>

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

	<div class="col-md-4">
		@include('components.uploader.widget', [
			'load_url' => ($specie['id'] ?? false) ? route('Admin.Botanic.Species.getImages', ['id' => $specie['id']]) : null,
			'delete_url' => route('Admin.Botanic.Species.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.form.upload.fileinput')

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