"use client"; import React, { memo } from "react"; import TextAnimation from "@/components/text/TextAnimation"; import Button from "@/components/button/Button"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { getButtonProps } from "@/lib/buttonUtils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import type { ButtonConfig } from "@/types/button"; import type { InvertedBackground } from "@/providers/themeProvider/config/constants"; type AnimationType = "entrance-slide" | "reveal-blur" | "background-highlight"; interface ContactTextProps { text: string; animationType?: AnimationType; buttons?: ButtonConfig[]; useInvertedBackground: InvertedBackground; ariaLabel?: string; className?: string; containerClassName?: string; textClassName?: string; buttonContainerClassName?: string; buttonClassName?: string; buttonTextClassName?: string; } const ContactText = ({ text, animationType = "entrance-slide", buttons, useInvertedBackground, ariaLabel = "Contact section", className = "", containerClassName = "", textClassName = "", buttonContainerClassName = "", buttonClassName = "", buttonTextClassName = "", }: ContactTextProps) => { const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); return (
{buttons && buttons.length > 0 && (
{buttons.slice(0, 2).map((button, index) => (
)}
); }; ContactText.displayName = "ContactText"; export default memo(ContactText);