import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Roots } from '@enums/root.enum';
import { IonicModule, NavController } from '@ionic/angular';
import { AlertService } from '@services/alert.service';

@Component({
    selector: 'app-sangh-term-policy',
    templateUrl: './sangh-term-policy.component.html',
    styleUrls: ['./sangh-term-policy.component.scss'],
    standalone: true,
    imports: [IonicModule, FormsModule]
})
export class SanghTermPolicyComponent {

    acceptTerm = false;

    constructor(private alert: AlertService,
        private navCtrl: NavController
    ) { }

    onNext(): void {
        if (!this.acceptTerm) {
            this.alert.showToasterError('Please accept terms & condition');
            return;
        }
        this.navCtrl.navigateForward(Roots.page + '/' + Roots.sanghInformation);
    }

}
