{include file="orderforms/$carttpl/common.tpl"}
<div class="main-banner banner-home banner-{$siteBannerStyle} banner-domain-register">
    <div class="container">
        <h1 class="banner-title">{$LANG.findyourdomain}</h1>
        <form method="post" action="{$WEB_ROOT}/cart.php" id="frmDomainChecker" {if isset($RSThemes['addonSettings']['tld_cycle_switcher']) && $RSThemes['addonSettings']['tld_cycle_switcher'] == 'true'}data-show-tld-cycle-switcher {if isset($smarty.get.period)}data-period="{$smarty.get.period|escape}"{/if}{/if} {if $showAdvancedSearchOptions} data-ai-search-enabled{/if}>
            <input type="hidden" name="a" value="checkDomain">
            {if $showAdvancedSearchOptions}
                {include file="orderforms/$carttpl/includes/domain/ai-domain-search.tpl"}
            {/if}
            <div class="domain-search-input search-group search-group-lg search-group-combined {if ($showAdvancedSearchOptions && !$smarty.get.query && $RSThemes.addonSettings.domain_search_default_classic  != 'enabled') || isset($smarty.get.message)}hidden{/if}" domain-search-standard>
                <div class="search-field d-flex flex-nowrap">
                    {if ($RSThemes['pages'][$templatefile]['config']['SearchPrefix'] || $RSThemes['pages'][$templatefile]['config']['SearchPrefix'] == "1")}
                        <div class="inline-form-prefix">
                            <span>{$LANG.orderForm.www}</span>
                        </div>
                    {/if}
                    <input class="form-control"  type="text" name="domain" placeholder="{$LANG.findyourdomain}" value="{$lookupTerm}" id="inputDomain" data-domain-search-input data-toggle="tooltip" data-placement="top" data-trigger="manual" title="{lang key='orderForm.domainOrKeyword'}" data-domain-search />
                    <div class="search-field-icon"><i class="lm lm-search" aria-hidden="true"></i></div>
                </div>
                <div class="search-group-btn">
                    <button tabindex="0" class="btn btn-primary domain-check-availability {if $captcha}{$captcha->getButtonClass($captchaForm)}{/if}" type="submit" id="btnCheckAvailability">
                        <span>{$LANG.search}</span>
                        <div class="loader loader-button">
                            {include file="$template/includes/common/loader.tpl" classes="spinner-sm"}  
                        </div>
                    </button>
                </div>
            </div>
            {if $showAdvancedSearchOptions}
                {include file="orderforms/$carttpl/includes/domain/ai-domain-tab.tpl" tabHeading=false tabsType="bottom"}
            {/if}
            {include file="orderforms/$carttpl/includes/domain/captcha.tpl" pageClass="rspage-modern"}
        </form>
        {if $hasPromoInCart && $RSThemes['addonSettings']['promocode_banner_label'] == "enabled"}    
            <div class="main-header-label">
                {include file="$template/includes/common/label-promo.tpl"}
            </div>
        {/if}
    </div>
        {if $RSThemes.styles.iconType == "modern"}
            {include file="$template/includes/common/svg-illustration.tpl" illustration="site/modern/banner-bg"} 
        {else} 
            {include file="$template/includes/common/svg-illustration.tpl" illustration="site/banner-bg"} 
        {/if}
</div>
<div class="main-body">
    <div class="container">
        <div class="m-w-lg m-h-a">
            {* <div class="section domain-lookup-loader message message-lg hidden" id="primaryLookupSearching">
                <div class="loader">
                    {include file="$template/includes/common/loader.tpl"}  
                </div>
            </div> *}
            <div class="section hidden" id="DomainSearchResults" data-scroll-to-results="false">
                <div class="domain-checker-result-headline" id="searchDomainInfo">
                    <div class="hidden" id="primaryLookupResult">
                        {include file="orderforms/$carttpl/includes/domain/search-result.tpl"}
                    </div>
                </div>
                {if $spotlightTlds}
                    {include file="orderforms/$carttpl/includes/domain/spotlight.tpl"}
                {/if}
                {include file="orderforms/$carttpl/includes/domain/suggested.tpl"}
                <div class="section domain-lookup-message domain-lookup-suggestions-message">
                    <div class="section-header">
                        <h2 class="section-title">{lang key='orderForm.suggestedDomains'}</h2>        
                        <p class="section-desc">{lang key='domainssuggestionswarnings'}</p>
                    </div>
                    <div class="section-body">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                {include file="$template/assets/img/aisearch-icon.svg"}
                                <div class="d-flex flex-column">
                                    <h6 class="mb-2 text-center">{$rslang->trans('domains.ai_search.no_data_title')}</h6>
                                    <p class="mb-0 text-center">{$rslang->trans('domains.ai_search.no_data_description')}</p>
                                </div>
                                <button class="btn btn-sm btn-default" type="button" data-reset-domain-search-button>{$rslang->trans('domains.ai_search.reset_search')}</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            {if $RSThemes['pages'][$templatefile]['config']['showFeaturedTLD'] == '1'}
            {include file="orderforms/$carttpl/includes/domain/featured-tlds.tpl"}
            {/if}
            {include file="orderforms/$carttpl/includes/domain/tld-pricing.tpl"}
            {include file="orderforms/$carttpl/includes/domain/bottom-sticky.tpl" type="domainsearch"}
        </div>
    </div>
</div>
{if $invalid}
<script>
    jQuery(document).ready(function() {
        jQuery('#primaryLookupSearching').toggle();
        jQuery('#primaryLookupResult').children().toggle();
        jQuery('#primaryLookupResult').toggle();
        jQuery('#DomainSearchResults').toggle();
        jQuery('.domain-invalid').toggle();
    });
</script>
{/if}

{if (($lookupTerm || $message) && !$captchaError && !$invalid) || (!$captcha->isEnabled() && ($lookupTerm || $message) && !$invalid)}
<script>
    jQuery(document).ready(function() {
        {literal}
            setTimeout(function(){
                jQuery('#btnCheckAvailability').trigger('click');
            }, 500);
        {/literal}
    });
</script>              
{/if}