{% set type = type|default('select') %}
<div class="{{ type }}">
    {% if form is not defined or form is null or form.vars.value is empty %}
        {% set template = type == 'lookup' ? lookupTemplate : selectTemplate %}
        {{ template|replace({
            ('properties_'~type~'_template'): 'properties',
            'properties': 'properties_template'
        })|raw }}
    {% else %}
        {{ form_row(form) }}
    {% endif %}
</div>
