/* eslint-disable import/prefer-default-export */
// eslint-disable-next-line import/no-extraneous-dependencies
import loadable from '@loadable/component';

export function getCard(type) {
  switch (type) {
    case 'operator':
      return loadable(() => import(`../components/atoms/cards/operator-card/template-one`));
    case 'game':
      return loadable(() => import(`../components/atoms/cards/game-cards/template-one`));
    case 'payment_method':
      return loadable(() => import(`../components/atoms/cards/payment-method/template-one`));
    case 'software_provider':
      return loadable(() => import(`../components/atoms/cards/software-provider-card/index`));
    case 'article':
    case 'page':
      return loadable(() => import(`../components/atoms/cards/article-card/template-one`));
    case 'author':
      return loadable(() => import(`../components/atoms/cards/author/template-one`));
    default:
      return loadable(() => import(`../components/atoms/cards/article-card/template-one`));
  }
}
