'use client'; import React from 'react'; import { Button } from '@/components/ui/Button'; import { motion } from 'framer-motion'; import { useTranslations } from 'next-intl'; export interface CallToActionProps { title?: string; description?: string; text?: string; // Alias for description ctaLabel?: string; buttonText?: string; // Alias for ctaLabel ctaHref?: string; buttonLink?: string; // Alias for ctaHref theme?: 'light' | 'dark'; } const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.15, delayChildren: 0.1, }, }, }; const itemVariants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.8, ease: [0.16, 1, 0.3, 1] as const }, }, }; export const CallToAction: React.FC = (props) => { const { theme = 'light' } = props; const isDark = theme === 'dark'; const t = useTranslations('CallToAction'); const title = props.title || t('title'); const description = props.description || props.text || t('description'); const ctaLabel = props.ctaLabel || props.buttonText || t('ctaLabel'); const ctaHref = props.ctaHref || props.buttonLink || t('ctaHref'); return (
{title} {description}
); };