<div class="row">
	<div class="col-12 text-right">
		@if ($display_by_rows ?? false)
			@include('components.form.button', ['id' => 'by_cards', 'icon' => 'fa-th', 'class' => 'btn-secondary'])
		@else
			@include('components.form.button', ['id' => 'by_rows', 'icon' => 'fa-list', 'class' => 'btn-secondary'])
		@endif

		@include('components.form.button', ['data_id' => 'botanic', 'icon' => 'fa-leaf', 'class' => 'products bg-yellow yellow-dark'])
		@include('components.form.button', ['data_id' => 'merchandise', 'icon' => 'fa-seedling', 'class' => 'products bg-green text-white'])

	</div>
</div>

@push('js')
	<script>
		$('#by_rows').click(function() {
			$('#display_by_rows').val(1);
			$('#category-form').submit();
		});
		$('#by_cards').click(function() {
			$('#display_by_rows').val(0);
			$('#category-form').submit();
		});
		$('.products').click(function() {
			$('#product_type').val($(this).data('id'));
			$('#category-form').submit();
		});
	</script>
@endpush