import { Navigate, Route, Routes } from 'react-router-dom';

import { Error404 } from '@/errors';
import { ArtistAlbumDetailPage } from '@/scene/artist/ArtistAlbumDetailPage';
import { ArtistDetailPage } from '@/scene/artist/ArtistDetailPage';
import { ArtistsPage } from '@/scene/artist/ArtistsPage';

export const ArtistRoutes = () => {
  return (
    <Routes>
      <Route path="/" element={<Navigate to="all" replace />} />
      <Route path="all" element={<ArtistsPage />} />
      <Route path=":artistId" element={<ArtistDetailPage />} />
      <Route
        path=":artistId/album/:albumId"
        element={<ArtistAlbumDetailPage />}
      />
      <Route path="*" element={<Error404 />} />
    </Routes>
  );
};
