{% import 'elements2024/macros/buttons.html.twig' as buttons %}
<!-- Hero section -->
<section class="home-hero-section relative max-lg:pt-32 max-lg:pb-16 md:h-screen">
<div class="absolute inset-0 overflow-hidden">
<div class="absolute inset-0 animate-slowLoopZoomInOut">
{% if image %}
<img class="home-hero-bg img-cover" src="{{image.thumbnails['1440x800']}}" srcset="{{image.thumbnails['2880x1600']}} 2x" alt="">
{% endif %}
<div class="absolute inset-0 bg-dark/20"></div>
</div>
</div>
<div class="container px-4 h-full flex flex-col justify-center relative">
<div class="xl:max-w-8/12 w-full mx-auto">
<h1 class="home-hero-title h2 text-center uppercase text-white" fade>{{ title }}</h1>
<div class="home-hero-deal flex flex-col md:flex-row gap-4 lg:gap-8 mt-16" fade>
<div class="form-deal-type">
<button data-form-action="/buy" data-price-select="acheter" class="active" >Acheter</button>
<button data-form-action="/rent" data-price-select="louer">Louer</button>
</div>
<a class="btn-rounded btn__green" href="/nos-services/estimer">
<span>Estimer</span>
<svg class="w-5 h-5" viewbox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.25 10H18.75" stroke="currentColor"/>
<path d="M13.75 5L18.75 10L13.75 15" stroke="currentColor"/>
</svg>
</a>
</div>
{% if eyebrowHtml is defined %}
<div class="text-white text-center">{{ eyebrowHtml | raw }}</div>
{% else %}
<form method="GET" action="/buy" class="home-hero-form flex flex-col lg:flex-row max-lg:gap-6 lg:justify-between bg-white py-6 lg:py-3 px-4 lg:pl-4 lg:pr-3 rounded-xl lg:rounded-full mt-4 lg:divide-x divide-dark/60">
<div class="multiselect-wrapp lg:w-1/4">
<label for="location" class="truncate">Localité(s) (Canton, ville, NPA)</label>
<div class="js-location-select" id="location" name="location[]" fetch-url="{{path('offers_locations_autocomplete')}}"></div>
</div>
<div class="multiselect-wrapp lg:w-1/4">
<label for="type">Type</label>
{{ render(controller('App\\Controller\\Website\\LayoutController::selectType')) }}
</div>
<div class="multiselect-wrapp lg:w-1/4">
<label>Budget (CHF)</label>
<div data-vue-root>
<dropdown>
<template slot="header">
<button
type="button"
class="vscomp-toggle-button vscomp-wrapper"
:class="{ 'has-value': priceSelectionDisplay }"
>
<div class="vscomp-value" v-text="priceSelectionDisplay || 'Choisir'"></div>
<div class="vscomp-arrow"></div>
</button>
</template>
<template slot="default">
<div class="flex gap-4">
<number-input-with-suggestions
input-class="simple-input"
v-model="priceMin"
:suggestions="minPriceSuggestions"
:format-option="formatPriceOption"
placeholder="Min"
name="priceMin"
list-class="vscomp-options-list price-list"
list-item-class="vscomp-option"
/>
<number-input-with-suggestions
input-class="simple-input"
v-model="priceMax"
:suggestions="maxPriceSuggestions"
:format-option="formatPriceOption"
placeholder="Max"
name="priceMax"
list-class="vscomp-options-list price-list"
list-item-class="vscomp-option"
/>
</div>
</template>
</dropdown>
</div>
</div>
<button class="btn-rounded btn__green">Recherche</button>
</form>
{% endif %}
</div>
</div>
</section>