{% form_theme form with app_form_themes() only %}

<div {{ attributes }}>
    {{ form_start(form, {
        attr: {
            class: 'mt-5 grid gap-4',
            'data-model': 'norender|*',
            'data-action': 'live#action:prevent',
            'data-live-action-param': 'submitResetPassword',
            novalidate: 'true'
        }
    }) }}
    <div class="grid gap-2">
        {{ form_label(form.plainPassword, null, {'label_attr': {'class': 'text-sm font-medium text-label'}}) }}
        {{ form_widget(form.plainPassword, {'attr': {
            class: 'h-12 bg-surface px-5 text-foreground placeholder:text-foreground-subtle ring-1 ring-inset ring-input-border focus:ring-1 focus:ring-inset focus:ring-accent',
            'data-action': 'blur->live#action',
            'data-live-action-param': 'validatePasswords'
        }}) }}
        <div class="text-sm text-error-foreground">{{ form_errors(form.plainPassword) }}</div>
    </div>
    <div class="grid gap-2">
        {{ form_label(form.passwordConfirmation, null, {'label_attr': {'class': 'text-sm font-medium text-label'}}) }}
        {{ form_widget(form.passwordConfirmation, {'attr': {
            class: 'h-12 bg-surface px-5 text-foreground placeholder:text-foreground-subtle ring-1 ring-inset ring-input-border focus:ring-1 focus:ring-inset focus:ring-accent',
            'data-action': 'blur->live#action',
            'data-live-action-param': 'validatePasswords'
        }}) }}
        <div class="text-sm text-error-foreground">{{ form_errors(form.passwordConfirmation) }}</div>
        <div class="text-sm text-error-foreground">{{ form_errors(form) }}</div>
    </div>
    <div class="grid gap-2">
        {% if form.captcha is defined %}
            {{ form_row(form.captcha) }}
        {% endif %}
    </div>
    <button
        type="submit"
        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"
        {% if not this.canSubmit %}disabled{% endif %}
    >
        {{ 'security.reset_password.submit'|trans }}
    </button>

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