import {Routes} from '@angular/router';
import {UploadComponent} from './upload/upload.component';
import {GalleryComponent} from './gallery/gallery.component';
import {PendingChangesGuard} from './upload/pending.guard';
import {AdminComponent} from './admin/admin.component';

export const routes: Routes = [
  {path: 'admin', component: AdminComponent},
  {path: 'gallery', component: GalleryComponent},
  {path: '', component: UploadComponent, canDeactivate: [PendingChangesGuard]},
  {path: '**', redirectTo: ''},
];
