import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { SocialSharing } from '@ionic-native/social-sharing/ngx';
import { IonicModule } from '@ionic/angular';

import { OffersdiscountPage } from './offersdiscount.page';
import { HomeComponent } from './home/home.component';
import { OfferDetailsComponent } from './offer-details/offer-details.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { OfferDiscountService } from './services/service';
import { FilterComponent } from './filter/filter.component';


const routes: Routes = [
  {
    path: '',
    component: OffersdiscountPage,
    children: [
      {
        path: 'home',
        component: HomeComponent
      },
      {
        path: 'offer-details',
        component: OfferDetailsComponent
      },
      {
        path: 'filter-page',
        component: FilterComponent
      },
    ],
  }
];



@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    HmgCommonModule,
    RouterModule.forChild(routes)
  ],
  declarations: [OffersdiscountPage, HomeComponent, OfferDetailsComponent, FilterComponent],
  entryComponents: [FilterComponent],
  providers: [OfferDiscountService, SocialSharing]
})
export class OffersdiscountPageModule { }
