import React, { memo } from "react";

import Spottable from "@enact/spotlight/Spottable";

import CustomImage from "../../../../../components/CustomImage/CustomImage";
import css from "./SeriesImageCard.module.less";

const SpottableComponent = Spottable("figure");

export default memo(function SeriesImageCard({
  imageAlt,
  imageSource,
  ariaLabel,
  ...rest
}) {
  delete rest.seriesNm;
  return (
    <SpottableComponent className={css.card} aria-label={ariaLabel} {...rest}>
      <CustomImage src={imageSource} alt={imageAlt} />
    </SpottableComponent>
  );
});
