{% block image_type_row %}
    <div class="flex flex-col">
        {% if form.vars.label %}
            {{ form_label(form['uploadedFile']) }}
        {% endif %}
        {% set errorClass = form['uploadedFile'].vars.errors|length > 0 ? 'border-red-800 border-2' : 'border-gray-300 border' %}
        <div class="rounded-lg border-dashed border-gray-300 dark:border-gray-600  {{ errorClass }}">
            {{ form_errors(form['uploadedFile']) }}
            <twig:SerenityMedia:FileForm
                formId="{{ form.vars.id }}"
                fileId="{{ form.vars.data ? form.vars.data.id : null }}"
                name="{{ form.vars.full_name }}"
                required="{{ form.vars.required }}"
                type="image"
                key="{{ form.vars.data and form.vars.data.file and form.vars.data.id ? form.vars.data.file.name|sha1 : null }}"
                classForValidateUpload="Serenity\\MediaBundle\\Entity\\Image"
                data-model="{{ form.vars.data ? 'data.image.file:file' : '' }}"/>
        </div>
        {{ form_help(form) }}
    </div>
{% endblock %}
