'use client';
import { forwardRef, HTMLAttributes } from 'react';
import { cn } from '@/shared/lib/utils';
export interface IncantationProps extends HTMLAttributes {
/** The incantation text to display */
children: string;
/** Intensity of the magical effect: subtle, medium, intense */
intensity?: 'subtle' | 'medium' | 'intense';
/** Magical language style: arcane, divine, eldritch */
language?: 'arcane' | 'divine' | 'eldritch';
/** Primary glow color */
glowColor?: string;
/** Secondary color for the shift effect */
shiftColor?: string;
/** Duration of the pulse cycle in seconds */
pulseDuration?: number;
}
export const Incantation = forwardRef(
(
{
children,
intensity = 'medium',
language = 'arcane',
glowColor = '#a855f7',
shiftColor = '#fbbf24',
pulseDuration = 2,
className,
style,
...props
},
ref
) => {
const intensityClasses = {
subtle: 'animate-incantation-subtle',
medium: 'animate-incantation-medium',
intense: 'animate-incantation-intense',
};
const languageClasses = {
arcane: 'font-serif uppercase tracking-wider',
divine: 'font-serif italic',
eldritch: 'font-black uppercase',
};
return (
{children}
);
}
);
Incantation.displayName = 'Incantation';
export default Incantation;