{# @var Model \rnpagebuilder\PageGenerator\Blocks\SearchBar\SearchBarBlock #}
{% extends "PageGenerator/Blocks/Core/BlockBase.twig" %}



{% macro Fields(Model) %}
    <div style="display: flex; flex-wrap: wrap;align-items: baseline">
        {% for CurrentField in Model.Fields %}
            {{ CurrentField.Render() }}
        {% endfor %}
    </div>
    <div>
        <button disabled  class="rnbtn rnbtn-success searchButton" tabindex="0" type="submit" style="align-items: center; display: flex;margin-left: 2px;margin-top: 3px;cursor: pointer;">
            <span class="jss2" style="display: flex">
                <svg fill="currentColor" viewBox="0 0 512 512" style="height: 1em; margin-right: 3px;">
                    <path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg>
            </span>
            <span>Search</span>
        </button>
    </div>
{% endmacro %}



{% block content %}
    {{ AddStyle('SearchBar', 'PageGenerator/Blocks/SearchBar/SearchBarBlock.css') }}

    {% if Model.Options.Label=='' %}
        <div style="display: block;">
            {{ _self.Fields(Model) }}
        </div>

    {% else %}
        <fieldset style="width: 100%;border:1px solid #dfdfdf;padding:5px;display: block;">
            <legend style="display: flex;align-items: center">
                <svg fill="currentColor" viewBox="0 0 512 512" style="height: 1em; margin-right: 5px;"><path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg>
                {{ Model.Options.Label }}
            </legend>
            {{ _self.Fields(Model) }}
        </fieldset>

    {% endif %}
{% endblock %}