{% form_theme form with app_form_themes() only %}

<div {{ attributes }}>
    {{ form_start(form, {
        attr: {
            class: 'grid gap-4',
            'data-action': 'live#action:prevent',
            'data-live-action-param': 'submitContact',
            'data-model': 'norender|*',
            novalidate: 'true'
        }
    }) }}
        {{ form_row(form.lastname) }}
        {{ form_row(form.firstname) }}
        {{ form_row(form.email) }}
        {{ form_row(form.phone) }}
        {{ form_row(form.object) }}
        {{ form_row(form.message) }}
        {{ form_row(form.captcha) }}

        <button
            type="submit"
            data-loading="addAttribute(disabled)"
            class="inline-flex min-h-12 items-center justify-center bg-foreground px-6 text-sm font-medium uppercase tracking-button text-on-foreground transition hover:bg-accent disabled:cursor-not-allowed disabled:bg-disabled"
        >
            <span data-loading="hide">{{ 'contact.form.submit'|trans([], 'messages') }}</span>
            <span data-loading="show">{{ 'submit'|trans([], 'form') }}</span>
        </button>

        <div class="hidden">{{ form_rest(form) }}</div>
    {{ form_end(form) }}
</div>
