'use client'; import React, { forwardRef } from 'react'; import { cn } from '../common'; import type { AnimationTrigger } from './types'; import { mergeRefs, useAnimationTrigger, usePixelAnimations } from './_internal/animation-hooks'; /* ───────────────────────────────────────────────────────────────────────── PixelGlitch — three-layer glitch effect (R/C ghost layers + main) with clip-path slices and color separation. ───────────────────────────────────────────────────────────────────────── */ export interface PixelGlitchProps { /** Content to glitch. */ children: React.ReactNode; /** Length of one full glitch loop in milliseconds. Default `3000`. */ duration?: number; /** Maximum horizontal displacement (pixels) of the ghost layers. Default `4`. */ intensity?: number; /** When the animation should play. Default `'mount'`. */ trigger?: AnimationTrigger; /** Fires after the final iteration. */ onComplete?: () => void; /** Extra class names applied to the wrapping `