<ion-header>
    <ion-toolbar>
        <ion-title>
            <h1>{{ title | translate }}</h1>
        </ion-title>
        <ion-buttons slot="end">
            <ion-button fill="clear" (click)="closeModal()" [attr.aria-label]="'core.close' | translate">
                <ion-icon slot="icon-only" name="fas-xmark" aria-hidden="true" />
            </ion-button>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content class="ion-padding">
    <form (ngSubmit)="submitPassword($event)" #passwordForm>
        <div>
            <ion-item>
                <ion-input [attr.aria-label]="placeholder | translate" class="ion-text-wrap core-ioninput-password" name="password"
                    type="password" placeholder="{{ placeholder | translate }}" [(ngModel)]="password" core-auto-focus
                    [clearOnEdit]="false">
                    <core-show-password slot="end" />
                </ion-input>
            </ion-item>
            <ion-item *ngIf="error" class="ion-text-wrap ion-padding-top text-danger">
                <core-format-text [text]="error | translate" />
            </ion-item>
        </div>
        <ion-button expand="block" type="submit" [disabled]="!password">
            {{ submit | translate }}
        </ion-button>
        <!-- Remove this once Ionic fixes this bug: https://github.com/ionic-team/ionic-framework/issues/19368 -->
        <input type="submit" class="core-submit-hidden-enter" />
    </form>
</ion-content>
