import React from 'react'; import { BenchmarkDataPoint } from '../types'; import { TrendingUp, TrendingDown, HelpCircle } from 'lucide-react'; import MethodologyFooter from './MethodologyFooter'; interface BenchmarkReportProps { data: BenchmarkDataPoint[]; } const BenchmarkBar: React.FC<{ user: number, industry: number, percentile: number, isLowerBetter?: boolean }> = ({ user, industry, percentile, isLowerBetter = false }) => { const isAbove = user > industry; const isPositive = isLowerBetter ? !isAbove : isAbove; const barWidth = `${percentile}%`; const barColor = percentile >= 75 ? 'bg-emerald-500' : percentile >= 50 ? 'bg-green-500' : percentile >= 25 ? 'bg-yellow-500' : 'bg-red-500'; return (
P{percentile}
); }; const BenchmarkReport: React.FC = ({ data }) => { return (

Benchmark de Industria

Comparativa de tus KPIs principales frente a los promedios del sector (percentil 50). La barra indica tu posicionamiento percentil.

Análisis de tu rendimiento en métricas clave comparado con el promedio de la industria para contextualizar tus resultados.

{data.map(item => { const isLowerBetter = item.kpi.toLowerCase().includes('aht') || item.kpi.toLowerCase().includes('coste'); const isAbove = item.userValue > item.industryValue; const isPositive = isLowerBetter ? !isAbove : isAbove; const gap = item.userValue - item.industryValue; const gapPercent = (gap / item.industryValue) * 100; return ( ) })}
Métrica (KPI) Tu Operación Industria (P50) Gap Posicionamiento (Percentil)
{item.kpi} {item.userDisplay} {item.industryDisplay} {isPositive ? : } {gapPercent.toFixed(1)}%
{/* Methodology Footer */}
); }; export default BenchmarkReport;