@php
	$terms = isset($_GET['term']) ? $_GET['term'] : false;
	$search = get_field('search_page', 'option');
@endphp

<div class='header__search'>
	<div class='header__search__icon'>
		@include('elements.svg.search-icon')
	</div>
	<form action="{{ $search }}" class="header__search__form">
		<div class="header__search__input">
			<button type="submit" class="header__search__button">
				@include('elements.svg.search-icon')
			</button>
			<input type="text"
				name="term"
				placeholder="{{ __('Pretraživanje', 'crofauna') }}"
				autocomplete="off"
				pattern=".{3,}"
				title="Minimun 3 characters"
				required
				class="header__search__term"
				@if($terms)
					value="{{ $terms }}"
				@endif
				>
		</div>
		<div class="header__search__close">
			<span></span>
			<span></span>
		</div>
	</form>
</div>
