import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { AuthenticationPage } from './authentication.page';
import { LoginComponent } from './login/login.component';
import { ForgotComponent } from './forgot/forgot.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { SelectButtonModule } from 'primeng/selectbutton';
//import { AgreementComponent } from './agreement/agreement.component';
import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
import { Device } from '@ionic-native/device/ngx';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';

import { SearchableOptionsModule } from '../hmg-common/ui/searchable-select/searchable-options.module';
import {  MobileNumberModule } from 'src/app/hmg-common/ui/mobile-number/mobile-number.module';
import { SmsdialogPageModule } from 'src/app/hmg-common/ui/smsdialog/smsdialog.module';
import { SmsPageModule } from 'src/app/hmg-common/ui/sms/sms.module';
import { SmsPageComponent } from './sms-page/sms-page.page';
import { CheckUserComponent } from './check-user/check-user.component';
import { ChangePasswordComponent } from './change-password/change-password.component';
import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'


const routes: Routes = [
    {
        path: '',
        component: AuthenticationPage,
        children: [
            {
                path: 'login',
                component: LoginComponent
            },
            {
                path: 'forgot',
                component: ForgotComponent
            },
            {
                path: 'smspage',
                component: SmsPageComponent
            },
            {
                path: 'checkuser',
                component: CheckUserComponent
            },
            {
                path: 'changepassowrd',
                component: ChangePasswordComponent
            },
            {
                path: 'confirmLogin',
                component: ConfirmLoginComponent
            }
        ]
    }
];

@NgModule({
    imports: [
        CommonModule,
        FormsModule,
        SmsdialogPageModule,
        SmsPageModule,
        IonicModule,
        RouterModule.forChild(routes),
        HmgCommonModule,
        SearchableOptionsModule,
        SelectButtonModule,
        MobileNumberModule

    ],
    declarations: [
        AuthenticationPage,
        LoginComponent,
        ForgotComponent,
        SmsPageComponent,
        CheckUserComponent,
        ChangePasswordComponent,
        ConfirmLoginComponent
    ],
    providers:[
        FingerprintAIO,
        Device,
        SplashScreen
    ]
})
export class AuthenticationPageModule { }
