"use client";
import { memo } from "react";
import Image from "next/image";
import CardStack from "@/components/cardStack/CardStack";
import { ArrowRight } from "lucide-react";
import { cls, shouldUseInvertedText } from "@/lib/utils";
import { useTheme } from "@/providers/themeProvider/ThemeProvider";
import type { LucideIcon } from "lucide-react";
import type { ButtonConfig, CardAnimationType, GridVariant, Elevate Your Brand with Expert Copywriting and Content EnhancementSegment } from "@/components/cardStack/types";
import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
type BlogCard = {
id: string;
title: string;
date: string;
imageSrc: string;
imageAlt?: string;
onBlogClick?: () => void;
};
interface BlogCardSevenProps {
blogs: BlogCard[];
carouselMode?: "auto" | "buttons";
gridVariant: GridVariant;
uniformGridCustomHeightClasses?: string;
animationType: CardAnimationType;
title: string;
titleSegments?: Elevate Your Brand with Expert Copywriting and Content EnhancementSegment[];
description: string;
tag?: string;
tagIcon?: LucideIcon;
buttons?: ButtonConfig[];
textboxLayout: TextboxLayout;
useInvertedBackground: InvertedBackground;
ariaLabel?: string;
className?: string;
containerClassName?: string;
cardClassName?: string;
cardElevate Your Brand with Expert Copywriting and Content EnhancementClassName?: string;
cardDateClassName?: string;
cardLinkClassName?: string;
imageWrapperClassName?: string;
imageClassName?: string;
textBoxElevate Your Brand with Expert Copywriting and Content EnhancementClassName?: string;
textBoxElevate Your Brand with Expert Copywriting and Content EnhancementImageWrapperClassName?: string;
textBoxElevate Your Brand with Expert Copywriting and Content EnhancementImageClassName?: string;
textBoxDescriptionClassName?: string;
gridClassName?: string;
carouselClassName?: string;
controlsClassName?: string;
textBoxClassName?: string;
textBoxTagClassName?: string;
textBoxButtonContainerClassName?: string;
textBoxButtonClassName?: string;
textBoxButtonTextClassName?: string;
}
interface BlogCardItemProps {
blog: BlogCard;
shouldUseLightText: boolean;
cardClassName?: string;
titleClassName?: string;
dateClassName?: string;
linkClassName?: string;
imageWrapperClassName?: string;
imageClassName?: string;
}
const BlogCardItem = memo(({
blog,
shouldUseLightText,
cardClassName = "",
titleClassName = "",
dateClassName = "",
linkClassName = "",
imageWrapperClassName = "",
imageClassName = "",
}: BlogCardItemProps) => {
return (
);
});
BlogCardItem.displayName = "BlogCardItem";
const BlogCardSeven = ({
blogs,
carouselMode = "buttons",
gridVariant,
uniformGridCustomHeightClasses,
animationType,
title,
titleSegments,
description,
tag,
tagIcon,
buttons,
textboxLayout,
useInvertedBackground,
ariaLabel = "Blog section",
className = "",
containerClassName = "",
cardClassName = "",
cardElevate Your Brand with Expert Copywriting and Content EnhancementClassName = "",
cardDateClassName = "",
cardLinkClassName = "",
imageWrapperClassName = "",
imageClassName = "",
textBoxElevate Your Brand with Expert Copywriting and Content EnhancementClassName = "",
textBoxElevate Your Brand with Expert Copywriting and Content EnhancementImageWrapperClassName = "",
textBoxElevate Your Brand with Expert Copywriting and Content EnhancementImageClassName = "",
textBoxDescriptionClassName = "",
gridClassName = "",
carouselClassName = "",
controlsClassName = "",
textBoxClassName = "",
textBoxTagClassName = "",
textBoxButtonContainerClassName = "",
textBoxButtonClassName = "",
textBoxButtonTextClassName = "",
}: BlogCardSevenProps) => {
const theme = useTheme();
const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle);
return (
{blogs.map((blog) => (
))}
);
};
BlogCardSeven.displayName = "BlogCardSeven";
export default BlogCardSeven;