@php Theme::asset()->container('footer')->usePath()->add('nouislider', 'js/nouislider.min.js'); Theme::asset()->container('footer')->usePath()->add('wnumb', 'js/wNumb.min.js'); Theme::asset()->container('footer')->usePath()->add('nice-select', 'js/jquery.nice-select.min.js'); $style ??= 1; $noLeftRound ??= false; $centeredTabs ??= false; $projectsSearchEnabled = (bool) ($shortcode->projects_search_enabled ?? true); $selectedTabs = explode(',', $shortcode->tabs ?: 'project,rent,sale'); $defaultSearchType = $shortcode->default_search_type ?: 'project'; $tabs = collect(['project' => __('Project'), 'rent' => __('For Rent'), 'sale' => __('For Sale')]) ->when(! RealEstateHelper::isEnabledProjects() || ! $projectsSearchEnabled, function ($tabs) use (&$projectsSearchEnabled) { $projectsSearchEnabled = false; return $tabs->forget('project'); }) ->reject(fn ($tab, $key) => $key !== 'project' && ! in_array($key, RealEstateHelper::enabledPropertyTypes())) ->reject(fn ($tab, $key) => ! in_array($key, $selectedTabs)) ->sortBy(fn ($tab, $key) => array_search($key, $selectedTabs)); if ($defaultSearchType === 'project' && ! in_array('project', $tabs->keys()->toArray())) { $defaultSearchType = $tabs->keys()->first(); } $propertyMaxPrice = get_max_properties_price(); $maxPrice = ($projectsSearchEnabled || $defaultSearchType === 'project') ? get_max_projects_price() : $propertyMaxPrice; if ($maxPrice < $propertyMaxPrice) { $maxPrice = $propertyMaxPrice; } @endphp @if ($tabs->isNotEmpty())
@if (count($tabs) > 1) @endif
$style === 3]) @if ($projectsSearchEnabled && $defaultSearchType === 'project') action="{{ RealEstateHelper::getProjectsListPageUrl() }}" @else action="{{ RealEstateHelper::getPropertiesListPageUrl() }}" @endif method="get" id="hero-search-form" > @include(Theme::getThemeNamespace('views.real-estate.partials.filters.base')) @if (theme_option('real_estate_enable_advanced_search', 'yes') == 'yes') @if ($projectsSearchEnabled)
@include(Theme::getThemeNamespace('views.real-estate.partials.filters.price', ['maxPrice' => $maxPrice])) @include(Theme::getThemeNamespace('views.real-estate.partials.filters.flat'))
@include(Theme::getThemeNamespace('views.real-estate.partials.filters.floor')) @include(Theme::getThemeNamespace('views.real-estate.partials.filters.block'))
@endif
! $projectsSearchEnabled || $defaultSearchType === 'project'])>
@include(Theme::getThemeNamespace('views.real-estate.partials.filters.price'), ['maxPrice' => $maxPrice]) @include(Theme::getThemeNamespace('views.real-estate.partials.filters.square'))
@include(Theme::getThemeNamespace('views.real-estate.partials.filters.bathroom')) @include(Theme::getThemeNamespace('views.real-estate.partials.filters.bedroom')) @include(Theme::getThemeNamespace('views.real-estate.partials.filters.floor')) @include(Theme::getThemeNamespace('views.real-estate.partials.filters.projects'))
@include(Theme::getThemeNamespace('views.real-estate.partials.filters.features'))
@endif
@endif