<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' => $merchandise['name'] ?? null, 'required' => true])
			</div>
			<div class="col-6">
				{{ Form::label('producers', 'Producteur') }}
				@include('components.form.select', [
					'name' => 'producer_id',
					'list' => $producers_list ?? [],
					'value' => $merchandise['provider_id'] ?? null,
					'class' => 'select2 form-control',
					'with_empty' => '',
				])
			</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' => $merchandise['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' => $merchandise['description'] ?? 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' => $merchandise['plus'] ?? null,
					'class' => 'editor',
					'rows' => 5,
					'required' => false,
				])		
			</div>
		</div>

	</div>

	<div class="col-md-4">
		@include('components.uploader.widget', [
			'load_url' => route('Admin.Shop.Merchandises.getImages', ['id' => $merchandise['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