import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { LayoutComponent } from '../../shared/layout/layout.component';
import { FavoritesPageComponent } from './favorites-page/favorites-page.component';
import { NewFavoritesPageComponent } from './favorites-page/new-favorite-page/new-favorite-page.component'

const routes: Routes = [
  {
    path: '',
    component: LayoutComponent,
    children: [
      { path: '', component: FavoritesPageComponent },
      { path: 'new/:url', component: NewFavoritesPageComponent}
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class FavoritesRoutingModule { }
