<!--
  ~ Copyright (C) 2023 StApps
  ~ This program is free software: you can redistribute it and/or modify it
  ~ under the terms of the GNU General Public License as published by the Free
  ~ Software Foundation, version 3.
  ~
  ~ This program is distributed in the hope that it will be useful, but WITHOUT
  ~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  ~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  ~ more details.
  ~
  ~ You should have received a copy of the GNU General Public License along with
  ~ this program. If not, see <https://www.gnu.org/licenses/>.
  -->

<ion-modal #modal [canDismiss]="!pendingChanges || canDismissModal">
  <ng-template>
    <ion-header>
      <ion-toolbar>
        <ion-title>{{ 'modal.TITLE_EDIT' | translate }}</ion-title>
        <ion-buttons slot="end">
          <ion-button (click)="save.emit(); dismiss(true)">{{
            'modal.DISMISS_CONFIRM' | translate
          }}</ion-button>
        </ion-buttons>
        <ion-buttons slot="start">
          <ion-button (click)="dismiss(true)">{{ 'modal.DISMISS_CANCEL' | translate }}</ion-button>
        </ion-buttons>
      </ion-toolbar>
    </ion-header>
    <ng-container *ngTemplateOutlet="content"> </ng-container>
  </ng-template>
</ion-modal>
