"use client"; import { motion } from "motion/react"; import { Calendar, MapPin, Briefcase, Zap, TrendingUp, Users, Award, ExternalLink, } from "lucide-react"; import { usePortfolioData } from "@/lib/usePortfolioData"; export default function Experience() { const { data, loading, error } = usePortfolioData(); if (loading) { return (
); } if (error || !data) { return (

Erro ao carregar dados de experiência.

); } const experiences = data.experiences .filter((exp) => exp.featured) .sort((a, b) => { // Extrair ano de início de cada experiência const getStartYear = (period: string) => { const yearMatch = period.match(/(\d{4})/); return yearMatch ? parseInt(yearMatch[1]) : 0; }; const yearA = getStartYear(a.period); const yearB = getStartYear(b.period); // Ordenar da mais antiga para a mais nova return yearA - yearB; }); // Configuração de cores por empresa/tipo const experienceConfig = { "innovo-tecnologia": { color: "from-blue-500 to-cyan-600", bgColor: "bg-blue-500/10", borderColor: "border-blue-500/20", iconColor: "text-blue-400", accent: "blue", }, "apolo-energia": { color: "from-green-500 to-emerald-600", bgColor: "bg-green-500/10", borderColor: "border-green-500/20", iconColor: "text-green-400", accent: "green", }, }; const getExperienceConfig = (company: string) => { const key = company .toLowerCase() .replace(/\s+/g, "-") .replace(/[^a-z0-9-]/g, ""); return ( experienceConfig[key as keyof typeof experienceConfig] || experienceConfig["innovo-tecnologia"] ); }; const formatDuration = (period: string) => { // Extrair meses da string de período (ex: "3 meses") const monthsMatch = period.match(/(\d+)\s*meses?/i); if (monthsMatch) { const months = parseInt(monthsMatch[1]); if (months < 12) { return `${months} ${months === 1 ? "mês" : "meses"}`; } else { const years = Math.floor(months / 12); const remainingMonths = months % 12; if (remainingMonths === 0) { return `${years} ${years === 1 ? "ano" : "anos"}`; } else { return `${years} ${ years === 1 ? "ano" : "anos" } e ${remainingMonths} ${remainingMonths === 1 ? "mês" : "meses"}`; } } } // Extrair anos da string de período (ex: "3 anos 5 meses") const yearsMatch = period.match(/(\d+)\s*anos?/i); if (yearsMatch) { const years = parseInt(yearsMatch[1]); return `${years}+ ${years === 1 ? "ano" : "anos"}`; } return "Experiência relevante"; }; return (
{/* Header */}
Jornada Profissional

Experiência Profissional

Uma trajetória de crescimento técnico e impacto real, onde cada projeto representou um novo nível de desafio e aprendizado

{/* Experience Cards Grid */}
{experiences.map((exp, index) => { const config = getExperienceConfig(exp.company); return ( {/* Content Card */}
{/* Background Glow */}
{/* Main Card */}
{/* Header */}

{exp.title}

{exp.company}

{/* Meta Info */}
{exp.period}
{exp.location && (
{exp.location}
)}
{exp.type}
{/* Duration Badge */}
{formatDuration(exp.period)}
{/* Description */}

{exp.description}

{/* Achievements */} {exp.achievements && exp.achievements.length > 0 && (

Principais Conquistas

{exp.achievements.map((achievement, idx) => (
{achievement}
))}
)} {/* Technologies */} {exp.technologies && exp.technologies.length > 0 && (

Stack Tecnológica

{exp.technologies.slice(0, 6).map((tech) => ( {tech} ))} {exp.technologies.length > 6 && ( +{exp.technologies.length - 6} )}
)}
); })}
{/* Summary Stats */}

Impacto e Crescimento

3+
Anos de Experiência
2
Empresas Diferentes
10+
Tecnologias Dominadas
); }