@model CatalogSettingsModel

<div class="card-body">
    <div class="form-group row">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="ProductSearchEnabled_OverrideForStore" asp-input="ProductSearchEnabled" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="ProductSearchEnabled" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="ProductSearchEnabled" />
            <span asp-validation-for="ProductSearchEnabled"></span>
        </div>
    </div>
    <div class="form-group row">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="ProductSearchAutoCompleteEnabled_OverrideForStore" asp-input="ProductSearchAutoCompleteEnabled" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="ProductSearchAutoCompleteEnabled" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="ProductSearchAutoCompleteEnabled" />
            <span asp-validation-for="ProductSearchAutoCompleteEnabled"></span>
        </div>
    </div>
    <nop-nested-setting asp-for="ProductSearchAutoCompleteEnabled">
        <div class="form-group row advanced-setting">
            <div class="col-md-3">
                <nop-override-store-checkbox asp-for="ProductSearchAutoCompleteNumberOfProducts_OverrideForStore" asp-input="ProductSearchAutoCompleteNumberOfProducts" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                <nop-label asp-for="ProductSearchAutoCompleteNumberOfProducts" />
            </div>
            <div class="col-md-9">
                <nop-editor asp-for="ProductSearchAutoCompleteNumberOfProducts" />
                <span asp-validation-for="ProductSearchAutoCompleteNumberOfProducts"></span>
            </div>
        </div>
        <div class="form-group row advanced-setting">
            <div class="col-md-3">
                <nop-override-store-checkbox asp-for="ShowLinkToAllResultInSearchAutoComplete_OverrideForStore" asp-input="ShowLinkToAllResultInSearchAutoComplete" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                <nop-label asp-for="ShowLinkToAllResultInSearchAutoComplete" />
            </div>
            <div class="col-md-9">
                <nop-editor asp-for="ShowLinkToAllResultInSearchAutoComplete" />
                <span asp-validation-for="ShowLinkToAllResultInSearchAutoComplete"></span>
            </div>
        </div>
        <div class="form-group row advanced-setting">
            <div class="col-md-3">
                <nop-override-store-checkbox asp-for="ShowProductImagesInSearchAutoComplete_OverrideForStore" asp-input="ShowProductImagesInSearchAutoComplete" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                <nop-label asp-for="ShowProductImagesInSearchAutoComplete" />
            </div>
            <div class="col-md-9">
                <nop-editor asp-for="ShowProductImagesInSearchAutoComplete" />
                <span asp-validation-for="ShowProductImagesInSearchAutoComplete"></span>
            </div>
        </div>
    </nop-nested-setting>
    <div class="form-group row advanced-setting">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="ProductSearchTermMinimumLength_OverrideForStore" asp-input="ProductSearchTermMinimumLength" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="ProductSearchTermMinimumLength" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="ProductSearchTermMinimumLength" />
            <span asp-validation-for="ProductSearchTermMinimumLength"></span>
        </div>
    </div>
    <div class="form-group row advanced-setting">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="SearchPageAllowCustomersToSelectPageSize_OverrideForStore" asp-input="SearchPageAllowCustomersToSelectPageSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="SearchPageAllowCustomersToSelectPageSize" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="SearchPageAllowCustomersToSelectPageSize" />
            <span asp-validation-for="SearchPageAllowCustomersToSelectPageSize"></span>
        </div>
    </div>
    <nop-nested-setting asp-for="SearchPageAllowCustomersToSelectPageSize" disable-auto-generation="true">
        <div class="form-group row advanced-setting" id="pnlSearchPageProductsPerPage">
            <div class="col-md-3">
                <nop-override-store-checkbox asp-for="SearchPageProductsPerPage_OverrideForStore" asp-input="SearchPageProductsPerPage" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                <nop-label asp-for="SearchPageProductsPerPage" />
            </div>
            <div class="col-md-9">
                <nop-editor asp-for="SearchPageProductsPerPage" />
                <span asp-validation-for="SearchPageProductsPerPage"></span>
            </div>
        </div>
        <div class="form-group row advanced-setting" id="pnlSearchPagePageSizeOptions">
            <div class="col-md-3">
                <nop-override-store-checkbox asp-for="SearchPagePageSizeOptions_OverrideForStore" asp-input="SearchPagePageSizeOptions" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                <nop-label asp-for="SearchPagePageSizeOptions" />
            </div>
            <div class="col-md-9">
                <nop-editor asp-for="SearchPagePageSizeOptions" />
                <span asp-validation-for="SearchPagePageSizeOptions"></span>
            </div>
        </div>
    </nop-nested-setting>
    <div class="form-group row advanced-setting">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="SearchPagePriceRangeFiltering_OverrideForStore" asp-input="SearchPagePriceRangeFiltering" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="SearchPagePriceRangeFiltering" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="SearchPagePriceRangeFiltering" />
            <span asp-validation-for="SearchPagePriceRangeFiltering"></span>
        </div>
    </div>
    <nop-nested-setting asp-for="SearchPagePriceRangeFiltering">
        <div class="form-group row advanced-setting">
            <div class="col-md-3">
                <nop-override-store-checkbox asp-for="SearchPageManuallyPriceRange_OverrideForStore" asp-input="SearchPageManuallyPriceRange" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                <nop-label asp-for="SearchPageManuallyPriceRange" />
            </div>
            <div class="col-md-9">
                <nop-editor asp-for="SearchPageManuallyPriceRange" />
                <span asp-validation-for="SearchPageManuallyPriceRange"></span>
            </div>
        </div>
        <nop-nested-setting asp-for="SearchPageManuallyPriceRange">
            <div class="form-group row advanced-setting">
                <div class="col-md-3">
                    <nop-override-store-checkbox asp-for="SearchPagePriceFrom_OverrideForStore" asp-input="SearchPagePriceFrom" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                    <nop-label asp-for="SearchPagePriceFrom" />
                </div>
                <div class="col-md-9">
                    <nop-editor asp-for="SearchPagePriceFrom" asp-postfix="@Model.PrimaryStoreCurrencyCode" />
                    <span asp-validation-for="SearchPagePriceFrom"></span>
                </div>
            </div>
            <div class="form-group row advanced-setting">
                <div class="col-md-3">
                    <nop-override-store-checkbox asp-for="SearchPagePriceTo_OverrideForStore" asp-input="SearchPagePriceTo" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                    <nop-label asp-for="SearchPagePriceTo" />
                </div>
                <div class="col-md-9">
                    <nop-editor asp-for="SearchPagePriceTo" asp-postfix="@Model.PrimaryStoreCurrencyCode" />
                    <span asp-validation-for="SearchPagePriceTo"></span>
                </div>
            </div>
        </nop-nested-setting>
    </nop-nested-setting>
    <div class="form-group row">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="AllowCustomersToSearchWithManufacturerName_OverrideForStore" asp-input="AllowCustomersToSearchWithManufacturerName" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="AllowCustomersToSearchWithManufacturerName" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="AllowCustomersToSearchWithManufacturerName" />
            <span asp-validation-for="AllowCustomersToSearchWithManufacturerName"></span>
        </div>
    </div>
     <div class="form-group row">
        <div class="col-md-3">
            <nop-override-store-checkbox asp-for="AllowCustomersToSearchWithCategoryName_OverrideForStore" asp-input="AllowCustomersToSearchWithCategoryName" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
            <nop-label asp-for="AllowCustomersToSearchWithCategoryName" />
        </div>
        <div class="col-md-9">
            <nop-editor asp-for="AllowCustomersToSearchWithCategoryName" />
            <span asp-validation-for="AllowCustomersToSearchWithCategoryName"></span>
        </div>
    </div>
</div>
<script>
    $(function() {
        $("#@Html.IdFor(model => model.SearchPageAllowCustomersToSelectPageSize)").click(toggleSearchPagePageSize);

        toggleSearchPagePageSize();
    });

    function toggleSearchPagePageSize() {
        if ($('#@Html.IdFor(model => model.SearchPageAllowCustomersToSelectPageSize)').is(':checked')) {
            $('#pnlSearchPageProductsPerPage').hideElement();
            $('#pnlSearchPagePageSizeOptions').showElement();
        } else {
            $('#pnlSearchPageProductsPerPage').showElement();
            $('#pnlSearchPagePageSizeOptions').hideElement();
        }
    }

</script>