@{ var _searchBtnText = "<?php _e('" + searchBtnText.replace(/'/g, '"') + "'); ?>"; }
<form id="search-@id" class="@classNames form-inline" method="<?php echo isset($_GET['preview']) ? 'post' : 'get'; ?>" name="searchform" action="<?php echo esc_url( home_url() ); ?>/">
    <div class="@containerInner">
        <div class="bd-search-wrapper">
            @if (showButton) {
                @if (buttonPosition === 'left') {
                <div class="bd-button-wrapper">
                    <input type="submit" class="@button.classNames" value="@_searchBtnText">
                </div>
                }
                <div class="bd-input-wrapper">
                    @include("input")
                </div>
                @if (buttonPosition === 'right') {
                <div class="bd-button-wrapper">
                    <input type="submit" class="@button.classNames" value="@_searchBtnText">
                </div>
                }
            } else {
                @include("input")
                @include("icon")
            }
        </div>
    </div>
    <?php
        $post_type = theme_get_option('theme_search_mode');
        if (!$post_type || $post_type === 'product' && !theme_woocommerce_enabled()) {
            $post_type = 'all';
        }
        if ($post_type !== 'all') {
            echo '<input type="hidden" name="post_type" value="' . $post_type . '" />';
        }
    ?>
</form>