'use client'; import { motion, useInView } from 'framer-motion'; import { useRef } from 'react'; import { useLocale } from '@/lib/i18n/locale-context'; import { SectionHeader } from '@/components/ui/SectionHeader'; import { Counter } from '@/components/ui/Counter'; import { cn } from '@/lib/utils'; const FA_DIGITS = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'] as const; const toFa = (s: string) => s.replace(/\d/g, (d) => FA_DIGITS[Number(d)]); export function Expertise() { const { t, locale } = useLocale(); const barsRef = useRef(null); const inView = useInView(barsRef, { once: true, margin: '-80px' }); return (
{/* Metric tiles */}
{t.hero.metrics.map((m, i) => (
{m.label}
))}
{/* Skill bars */}
    {t.expertise.bars.map((b, i) => (
  • {b.label} {locale === 'fa' ? toFa(b.value.toString()) + '٪' : `${b.value}%`}
  • ))}
); }