/* eslint-disable react/prop-types */
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable react/destructuring-assignment */
import React from 'react';
import Card from 'gatsby-core-theme/src/components/organisms/cards/index';
import { getCard } from '../../../../helpers/cards';

export default ({ module, page }) => {
  const customCardComponent = getCard(module?.model_type || module?.cards_page_type);
  return (
    <Card
      module={module}
      mobileColumns={1}
      tabletColumns={2}
      desktopColumns={3}
      CustomCardComponent={customCardComponent}
      pageTemplate={page?.template}
    />
  );
};
