// data.jsx — mock data shared across pages

const EMPLOYEES = [
  { id: 'E001', name: 'Sarah Chen',        role: 'Engineering Manager',  dept: 'R&D',         loc: 'Bangkok',  performance: 92, potential: 85, ccd: 'Blue',   tenure: 6.2 },
  { id: 'E002', name: 'Marcus Tanaka',     role: 'Senior Engineer',      dept: 'Manufacturing',loc: 'Bangkok', performance: 88, potential: 78, ccd: 'Green',  tenure: 4.5 },
  { id: 'E003', name: 'Priya Kumar',       role: 'QA Lead',              dept: 'Quality',     loc: 'Chennai',  performance: 84, potential: 88, ccd: 'Yellow', tenure: 3.1 },
  { id: 'E004', name: 'David Park',        role: 'Product Manager',      dept: 'Product',     loc: 'Singapore',performance: 90, potential: 91, ccd: 'Red',    tenure: 5.4 },
  { id: 'E005', name: 'Linh Nguyen',       role: 'HR Business Partner',  dept: 'HR',          loc: 'Hanoi',    performance: 78, potential: 72, ccd: 'Green',  tenure: 2.8 },
  { id: 'E006', name: 'Hassan Al-Mansoori',role: 'Operations Supervisor',dept: 'Manufacturing',loc: 'Dubai',   performance: 81, potential: 65, ccd: 'Yellow', tenure: 8.0 },
  { id: 'E007', name: 'Mei Wong',          role: 'Data Analyst',         dept: 'Strategy',    loc: 'Hong Kong',performance: 86, potential: 82, ccd: 'Blue',   tenure: 2.0 },
  { id: 'E008', name: 'Robert Cruz',       role: 'Sales Manager',        dept: 'Sales',       loc: 'Manila',   performance: 75, potential: 70, ccd: 'Red',    tenure: 4.1 },
  { id: 'E009', name: 'Aishah Rahman',     role: 'Service Engineer',     dept: 'Service',     loc: 'Kuala Lumpur',performance: 70, potential: 60, ccd: 'Green', tenure: 1.5 },
  { id: 'E010', name: 'James O\'Brien',    role: 'Finance Director',     dept: 'Finance',     loc: 'Sydney',   performance: 89, potential: 80, ccd: 'Blue',   tenure: 10.0 },
  { id: 'E011', name: 'Yuki Sato',         role: 'Design Lead',          dept: 'Product',     loc: 'Tokyo',    performance: 87, potential: 90, ccd: 'Red',    tenure: 3.6 },
  { id: 'E012', name: 'Carlos Mendez',     role: 'Plant Manager',        dept: 'Manufacturing',loc: 'Mexico City',performance: 76, potential: 55, ccd: 'Yellow', tenure: 12.0 },
];

const CORE_VALUES = [
  { key: 'absolute_credibility', label: 'Absolute Credibility', desc: 'Build trust through reliable action and transparent communication.' },
  { key: 'enterprising',         label: 'Enterprising Management', desc: 'Take initiative and pursue opportunities with disciplined risk-taking.' },
  { key: 'harmonious_growth',    label: 'Harmonious Personal Growth', desc: 'Grow as an individual while contributing to collective success.' },
];

const COMPETENCIES = [
  { key: 'leadership',    label: 'Leadership',          score: 82, max: 100, group: 'Core' },
  { key: 'communication', label: 'Communication',       score: 88, max: 100, group: 'Core' },
  { key: 'problem_solve', label: 'Problem Solving',     score: 76, max: 100, group: 'Core' },
  { key: 'innovation',    label: 'Innovation',          score: 71, max: 100, group: 'Core' },
  { key: 'technical',     label: 'Technical Expertise', score: 85, max: 100, group: 'Functional' },
  { key: 'project_mgmt',  label: 'Project Management',  score: 79, max: 100, group: 'Functional' },
  { key: 'analytical',    label: 'Analytical Thinking', score: 83, max: 100, group: 'Functional' },
  { key: 'collaboration', label: 'Collaboration',       score: 90, max: 100, group: 'Behavioral' },
  { key: 'adaptability',  label: 'Adaptability',        score: 74, max: 100, group: 'Behavioral' },
  { key: 'customer',      label: 'Customer Focus',      score: 81, max: 100, group: 'Behavioral' },
];

const KPI_DATA = [
  { quarter: 'Q1 2025', target: 80, actual: 78 },
  { quarter: 'Q2 2025', target: 80, actual: 82 },
  { quarter: 'Q3 2025', target: 85, actual: 84 },
  { quarter: 'Q4 2025', target: 85, actual: 89 },
  { quarter: 'Q1 2026', target: 88, actual: 86 },
];

const KPI_ITEMS = [
  { id: 'K01', name: 'Annual Performance Score',    target: 85,  actual: 89,  unit: '%',  trend: 'up',   weight: 30 },
  { id: 'K02', name: 'Skill Certification Achieved',target: 4,   actual: 5,   unit: 'certs', trend: 'up',weight: 15 },
  { id: 'K03', name: 'Cross-functional Projects',   target: 3,   actual: 3,   unit: 'projects', trend: 'flat',weight: 15 },
  { id: 'K04', name: 'Training Hours Completed',    target: 60,  actual: 72,  unit: 'hrs', trend: 'up',  weight: 10 },
  { id: 'K05', name: 'Peer Recognition Score',      target: 4.0, actual: 4.3, unit: '/5',  trend: 'up',  weight: 15 },
  { id: 'K06', name: '360° Feedback Average',       target: 4.0, actual: 3.8, unit: '/5',  trend: 'down',weight: 15 },
];

// CCD - 20 questions for color-code detection
// Each option maps to one of: R (Red - Action), B (Blue - Analytical), Y (Yellow - Influential), G (Green - Supportive)
const CCD_QUESTIONS = [
  { q: 'When starting a new project, I tend to:', options: [
    { color: 'R', text: 'Jump in and start executing immediately.' },
    { color: 'B', text: 'Research thoroughly and plan every detail.' },
    { color: 'Y', text: 'Gather the team and brainstorm ideas.' },
    { color: 'G', text: 'Listen to others before deciding on an approach.' },
  ]},
  { q: 'In a team meeting, my role is usually to:', options: [
    { color: 'Y', text: 'Energize the group and drive enthusiasm.' },
    { color: 'B', text: 'Ask clarifying questions and verify facts.' },
    { color: 'R', text: 'Push for decisions and concrete outcomes.' },
    { color: 'G', text: 'Make sure everyone is heard.' },
  ]},
  { q: 'When a deadline approaches, I:', options: [
    { color: 'R', text: 'Work intensely to push through.' },
    { color: 'G', text: 'Support teammates with what they need.' },
    { color: 'B', text: 'Check the plan and identify gaps.' },
    { color: 'Y', text: 'Rally the team and keep morale high.' },
  ]},
  { q: 'My preferred work environment is:', options: [
    { color: 'B', text: 'Quiet, structured, with clear processes.' },
    { color: 'Y', text: 'Open, collaborative, with constant interaction.' },
    { color: 'G', text: 'Stable, friendly, and predictable.' },
    { color: 'R', text: 'Fast-paced and challenging.' },
  ]},
  { q: 'When facing a conflict, I prefer to:', options: [
    { color: 'R', text: 'Address it directly and resolve it fast.' },
    { color: 'G', text: 'Mediate and find common ground.' },
    { color: 'B', text: 'Analyze the cause before responding.' },
    { color: 'Y', text: 'Talk it through openly with everyone.' },
  ]},
  { q: 'I am most motivated by:', options: [
    { color: 'R', text: 'Achieving challenging goals.' },
    { color: 'Y', text: 'Recognition and visible impact.' },
    { color: 'B', text: 'Mastering complex problems.' },
    { color: 'G', text: 'Helping the team succeed.' },
  ]},
  { q: 'When making a decision, I rely on:', options: [
    { color: 'B', text: 'Data, evidence, and logic.' },
    { color: 'R', text: 'Speed and decisive judgment.' },
    { color: 'G', text: 'Consensus and trusted opinions.' },
    { color: 'Y', text: 'Intuition and excitement.' },
  ]},
  { q: 'Under pressure, I tend to:', options: [
    { color: 'R', text: 'Take control and push harder.' },
    { color: 'B', text: 'Step back and re-plan.' },
    { color: 'Y', text: 'Talk through options out loud.' },
    { color: 'G', text: 'Stay calm and steady the team.' },
  ]},
  { q: 'My communication style is:', options: [
    { color: 'R', text: 'Direct and to the point.' },
    { color: 'Y', text: 'Expressive and animated.' },
    { color: 'B', text: 'Precise and detailed.' },
    { color: 'G', text: 'Patient and considerate.' },
  ]},
  { q: 'When learning something new, I prefer to:', options: [
    { color: 'B', text: 'Read manuals and study the theory.' },
    { color: 'R', text: 'Try it hands-on right away.' },
    { color: 'Y', text: 'Discuss it with someone experienced.' },
    { color: 'G', text: 'Take my time to absorb it.' },
  ]},
  { q: 'I tend to evaluate success by:', options: [
    { color: 'R', text: 'Results and outcomes delivered.' },
    { color: 'B', text: 'Accuracy and quality of work.' },
    { color: 'Y', text: 'Relationships and visibility gained.' },
    { color: 'G', text: 'Stability and team well-being.' },
  ]},
  { q: 'When delegating, I usually:', options: [
    { color: 'R', text: 'Set clear targets and expect ownership.' },
    { color: 'B', text: 'Provide detailed instructions and standards.' },
    { color: 'Y', text: 'Inspire and trust the team.' },
    { color: 'G', text: 'Coach gently and check in often.' },
  ]},
  { q: 'My weakness might be:', options: [
    { color: 'R', text: 'Being too impatient or blunt.' },
    { color: 'B', text: 'Over-analyzing and slow decisions.' },
    { color: 'Y', text: 'Distracted or over-committed.' },
    { color: 'G', text: 'Avoiding conflict or change.' },
  ]},
  { q: 'When meeting new people, I:', options: [
    { color: 'Y', text: 'Strike up conversations easily.' },
    { color: 'G', text: 'Listen and observe before engaging.' },
    { color: 'R', text: 'Focus on what is useful to the goal.' },
    { color: 'B', text: 'Prefer one-on-one over groups.' },
  ]},
  { q: 'I prefer to solve problems by:', options: [
    { color: 'B', text: 'Systematic analysis of root causes.' },
    { color: 'R', text: 'Trying solutions quickly.' },
    { color: 'Y', text: 'Brainstorming with diverse minds.' },
    { color: 'G', text: 'Sticking to proven methods.' },
  ]},
  { q: 'My approach to change is:', options: [
    { color: 'R', text: 'Drive it and seize the opportunity.' },
    { color: 'Y', text: 'Embrace and promote it.' },
    { color: 'B', text: 'Evaluate the risk first.' },
    { color: 'G', text: 'Adapt gradually and steadily.' },
  ]},
  { q: 'When giving feedback, I:', options: [
    { color: 'R', text: 'Am candid and to the point.' },
    { color: 'G', text: 'Frame it gently and supportively.' },
    { color: 'B', text: 'Stick to objective evidence.' },
    { color: 'Y', text: 'Mix encouragement with suggestions.' },
  ]},
  { q: 'I find most fulfillment in:', options: [
    { color: 'R', text: 'Winning and reaching goals.' },
    { color: 'Y', text: 'Connecting with people.' },
    { color: 'B', text: 'Mastering my craft.' },
    { color: 'G', text: 'Helping others grow.' },
  ]},
  { q: 'When time is tight, I:', options: [
    { color: 'R', text: 'Cut through the noise and act.' },
    { color: 'B', text: 'Stick to the structured process.' },
    { color: 'Y', text: 'Energize the team to push.' },
    { color: 'G', text: 'Stay steady and reliable.' },
  ]},
  { q: 'My ideal role would involve:', options: [
    { color: 'R', text: 'Leading and driving strategy.' },
    { color: 'B', text: 'Designing systems and analysis.' },
    { color: 'Y', text: 'Building relationships and reach.' },
    { color: 'G', text: 'Mentoring and team development.' },
  ]},
];

const CCD_PROFILES = {
  R: {
    name: 'Red', subtitle: 'The Driver',
    summary: 'Decisive, action-oriented, and goal-driven. You move fast, take ownership and thrive on outcomes.',
    strengths: ['Decisive under pressure', 'Goal-oriented execution', 'Comfortable leading', 'High-tempo delivery'],
    growthAreas: ['Pause before reacting', 'Invite others into decisions', 'Tolerate ambiguity longer', 'Soften delivery of feedback'],
    weaknesses: ['Can be impatient or blunt', 'May overlook important details', 'Risk of overriding others’ input', 'Low tolerance for ambiguity'],
    skillsToDevelop: ['Active listening', 'Patient delegation', 'Empathy and tact', 'Strategic patience'],
    cautions: ['Pause before reacting under pressure', 'Avoid dominating discussions', 'Watch for team burnout', 'Don’t trade quality for speed'],
    suitedRoles: ['Project Leader', 'Operations Manager', 'Sales Director', 'Plant Manager'],
  },
  B: {
    name: 'Blue', subtitle: 'The Analyst',
    summary: 'Methodical, precise, and quality-focused. You bring rigor, structure and depth to every problem.',
    strengths: ['Analytical rigor', 'Detail-oriented', 'Quality-focused', 'Process design'],
    growthAreas: ['Decide with less data', 'Communicate big picture', 'Embrace iteration', 'Build informal networks'],
    weaknesses: ['Analysis paralysis', 'Slow to commit to a decision', 'Overly risk-averse', 'Can appear detached or overly critical'],
    skillsToDevelop: ['Deciding with limited data', 'Communicating the big picture', 'Building informal networks', 'Comfort with iteration'],
    cautions: ['Don’t let perfect block progress', 'Share conclusions earlier', 'Stay open to others’ ideas', 'Avoid over-engineering'],
    suitedRoles: ['R&D Engineer', 'Data Analyst', 'Quality Manager', 'Finance Lead'],
  },
  Y: {
    name: 'Yellow', subtitle: 'The Influencer',
    summary: 'Expressive, energetic, and people-focused. You spark momentum and bring others along with you.',
    strengths: ['Building relationships', 'Inspiring teams', 'Creative ideation', 'Persuasive communication'],
    growthAreas: ['Follow through on detail', 'Manage time and focus', 'Listen to dissent', 'Structure your output'],
    weaknesses: ['Loses focus on detail', 'Tends to over-commit', 'Dislikes routine and follow-up', 'May skip the hard data'],
    skillsToDevelop: ['Follow-through and structure', 'Time and priority management', 'Listening to dissent', 'Data-based decision making'],
    cautions: ['Don’t overpromise', 'Track details through to closure', 'Protect your calendar', 'Listen before persuading'],
    suitedRoles: ['Sales Manager', 'HR Business Partner', 'Marketing Lead', 'Trainer'],
  },
  G: {
    name: 'Green', subtitle: 'The Supporter',
    summary: 'Patient, steady, and team-oriented. You are the dependable anchor that keeps teams cohesive.',
    strengths: ['Reliability', 'Active listening', 'Conflict mediation', 'Steady delivery'],
    growthAreas: ['Voice your views earlier', 'Embrace change actively', 'Push back constructively', 'Take visible initiative'],
    weaknesses: ['Avoids conflict', 'Resists sudden change', 'Slow to voice opinions', 'Can be overlooked or taken for granted'],
    skillsToDevelop: ['Assertiveness', 'Embracing change proactively', 'Taking visible initiative', 'Constructive pushback'],
    cautions: ['Speak up earlier', 'Don’t avoid necessary conflict', 'Set clear personal boundaries', 'Adapt before being forced to'],
    suitedRoles: ['HR Specialist', 'Customer Service Lead', 'Mentor / Coach', 'Operations Support'],
  },
};

const RECENT_ACTIVITIES = [
  { icon: 'check',  title: 'Sarah Chen completed CCD Assessment', time: '15 min ago' },
  { icon: 'star',   title: 'Q1 Performance Reviews finalized for R&D dept', time: '2 hours ago' },
  { icon: 'plus',   title: 'New talent added to High-Potential pool: Yuki Sato', time: '4 hours ago' },
  { icon: 'report', title: 'Q4 2025 Talent Report published', time: '1 day ago' },
  { icon: 'edit',   title: 'KPI targets updated for Manufacturing division', time: '2 days ago' },
];

window.RTDC_DATA = {
  EMPLOYEES, CORE_VALUES, COMPETENCIES, KPI_DATA, KPI_ITEMS,
  CCD_QUESTIONS, CCD_PROFILES, RECENT_ACTIVITIES,
};
