"use client"; import TextAnimation from "@/components/text/TextAnimation"; import Button from "@/components/button/Button"; import HeroBackgrounds, { type HeroBackgroundVariantProps } from "@/components/background/HeroBackgrounds"; 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"; import Image from "next/image"; type AnimationType = "entrance-slide" | "reveal-blur" | "background-highlight"; type ContactTextBackgroundProps = Extract< HeroBackgroundVariantProps, | { variant: "plain" } | { variant: "animated-grid" } | { variant: "canvas-reveal" } | { variant: "cell-wave" } | { variant: "downward-rays-animated" } | { variant: "downward-rays-animated-grid" } | { variant: "downward-rays-static" } | { variant: "downward-rays-static-grid" } | { variant: "gradient-bars" } | { variant: "radial-gradient" } | { variant: "rotated-rays-animated" } | { variant: "rotated-rays-animated-grid" } | { variant: "rotated-rays-static" } | { variant: "rotated-rays-static-grid" } | { variant: "sparkles-gradient" } >; interface ContactTextProps { text: string; animationType?: AnimationType; buttons?: ButtonConfig[]; background: ContactTextBackgroundProps; useInvertedBackground: InvertedBackground; ariaLabel?: string; className?: string; containerClassName?: string; contentClassName?: string; textClassName?: string; buttonContainerClassName?: string; buttonClassName?: string; buttonTextClassName?: string; } const ContactText = ({ text, animationType = "entrance-slide", buttons, background, useInvertedBackground, ariaLabel = "Contact section", className = "", containerClassName = "", contentClassName = "", 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) => (
)}
Contact Image
); }; ContactText.displayName = "ContactText"; export default ContactText;