import { Routes } from "@angular/router";
import { artistResolver, ComicArtistsComponent } from "../comic-artists/comic-artists.component";
import { ComicPublishersComponent, publisherResolver } from './../comic-publishers/comic-publishers.component';
import { ComicComicsComponent, comicResolver } from "../comic-comics/comic-comics.component";

export const comicRoutes: Routes = [
    {
        path: 'comics',
        component: ComicComicsComponent
    },
    {
      path: 'comics/:comicId',
      component: ComicComicsComponent,
      resolve: {
        comic: comicResolver
      }
    },
    {
        path: 'publisher',
        component: ComicPublishersComponent
    },
    {
        path: 'publisher/:publisherId',
        component: ComicPublishersComponent,
        resolve: {
          publisher: publisherResolver
        }
    },
    {
        path: 'artist',
        component: ComicArtistsComponent
    },
    {
        path: 'artist/:artistId',
        component: ComicArtistsComponent,
        resolve: {
            artist: artistResolver
        }
    },
];
