import React, { useState } from 'react';
import { CheckCircle2, ChevronRight, RotateCcw, Compass } from 'lucide-react';
const CareAssessment = () => {
const [currentScreen, setCurrentScreen] = useState('intro');
const [scenario, setScenario] = useState('');
const questions = [
["I'm good at recognizing alternatives.", "I tend to focus on many things at once.", "I like to see the consequences before I act.", "I like to examine the details."],
["I prefer to be actively involved in things.", "I enjoy getting attention.", "I like to use ideas others have thought through.", "I like to take things one step at a time."],
["I like to discuss concepts.", "I don't feel obligated to follow tradition.", "I prefer to test new things on a small scale before implementing a change.", "I like things to be balanced and symmetrical."],
["I'm good at exploring alternatives.", "I let my feelings guide me.", "I am uncomfortable when things are changing.", "Others might say I think like 1-2-3-4-5."],
["I like to focus on coming up with new ideas.", "I tend to move from one subject to another.", "I let accepted norms and expectations guide me.", "I prefer to think things over carefully before acting."],
["I like to develop theories and principles.", "When everything is in place, I am restless.", "I tend to be cautious in trying out a new approach.", "I like to be in a place where there is order."],
["I'm good at visualizing the master plan.", "Others might say I think like 1-3-2-purple-5-alligator.", "I don't challenge the status quo.", "My ideas focus on what I can prove is true."],
["I often think about what should happen next.", "I sometimes get impatient.", "I try to fit in with other people.", "I tend to follow a process when solving problems."],
["I'm good at capturing the essential core of a matter.", "I let my own preferences guide me.", "I prefer to let others take the lead.", "I am comfortable being methodical."],
["I'm good at analyzing things.", "I like to have respect.", "I like to see things fit together.", "I'm good at putting things in order."],
["I like to discuss implementation.", "I sometimes act impulsively.", "Initially, I respond to new ideas with skepticism.", "I prefer to spend my time creating order."],
["I prefer to focus on the future.", "I like to have influence.", "I prefer to try a proven solution, rather than try something unproven.", "A good description of my thought process would be step-by-step."]
];
const [rankings, setRankings] = useState(
Array(12).fill(null).map(() => [null, null, null, null])
);
const handleRankChange = (rowIndex, colIndex, value) => {
const newRankings = [...rankings];
const numValue = value === '' ? null : parseInt(value);
const currentRow = newRankings[rowIndex];
if (numValue !== null) {
const existingIndex = currentRow.indexOf(numValue);
if (existingIndex !== -1 && existingIndex !== colIndex) {
currentRow[existingIndex] = null;
}
}
newRankings[rowIndex][colIndex] = numValue;
setRankings(newRankings);
};
const getRowTotal = (rowIndex) => {
return rankings[rowIndex].reduce((sum, val) => sum + (val || 0), 0);
};
const isRowComplete = (rowIndex) => {
const row = rankings[rowIndex];
return row.every(val => val !== null) && getRowTotal(rowIndex) === 10;
};
const allRowsComplete = () => {
return rankings.every((_, idx) => isRowComplete(idx));
};
const getTotalScore = () => {
return rankings.reduce((total, row) =>
total + row.reduce((sum, val) => sum + (val || 0), 0), 0
);
};
const calculateResults = () => {
const totals = [0, 0, 0, 0];
rankings.forEach(row => {
row.forEach((val, idx) => {
totals[idx] += val || 0;
});
});
return totals;
};
const getPrimaryTypes = () => {
const totals = calculateResults();
const max = Math.max(...totals);
const types = ['X', 'T', 'C', 'S'];
const primaryTypes = [];
totals.forEach((total, idx) => {
if (total === max) {
primaryTypes.push(types[idx]);
}
});
return primaryTypes;
};
if (currentScreen === 'intro') {
return (
);
}
if (currentScreen === 'assessment') {
return (
{questions.map((row, rowIndex) => (
))}
);
}
if (currentScreen === 'results') {
const totals = calculateResults();
const primaryTypes = getPrimaryTypes();
const labels = ['X', 'T', 'C', 'S'];
const fullLabels = ['Creator', 'Advancer', 'Executor', 'Refiner'];
const descriptions = [
'You are a big-picture thinker who generates new ideas and sees possibilities others miss. You thrive on innovation and love exploring uncharted territory. Your greatest contribution to any team is the ability to envision what could be.',
'You are an energetic champion who moves ideas forward and rallies others around a vision. You bring momentum, enthusiasm, and social energy to any group. Your greatest contribution is turning possibility into motion.',
'You are a dependable implementer who makes things happen. You value proven methods, steady progress, and getting the job done right. Your greatest contribution is turning plans into reality with consistency and follow-through.',
'You are a systematic thinker who ensures quality and precision. You analyze carefully, improve existing processes, and raise the standard of everything you touch. Your greatest contribution is making good things even better.'
];
const colors = [
'from-orange-500 to-red-600',
'from-pink-500 to-rose-600',
'from-blue-500 to-cyan-600',
'from-green-500 to-emerald-600'
];
const bgColors = ['bg-orange-500', 'bg-pink-500', 'bg-blue-500', 'bg-green-500'];
const maxScore = Math.max(...totals);
return (
);
}
};
export default CareAssessment;
C.A.R.E. Profile
Discover your Team Dimension
{[
{ letter: 'C', label: 'Creator', color: 'bg-orange-100 text-orange-700 border-orange-200', desc: 'Big-picture thinkers who generate new ideas' },
{ letter: 'A', label: 'Advancer', color: 'bg-pink-100 text-pink-700 border-pink-200', desc: 'Energetic champions who move ideas forward' },
{ letter: 'R', label: 'Refiner', color: 'bg-green-100 text-green-700 border-green-200', desc: 'Systematic thinkers who perfect the details' },
{ letter: 'E', label: 'Executor', color: 'bg-blue-100 text-blue-700 border-blue-200', desc: 'Dependable implementers who get things done' },
].map(({ letter, label, color, desc }) => (
))}
{letter}
{label}
{desc}
How it works:
1
Choose your context — a specific team, project, or organization you have in mind.
2
For each question, rank all 4 statements — 4 for the one most like you, 1 for least like you. Use each number only once per row.
3
Each row must total 10. Your complete assessment will total 120.
setScenario(e.target.value)}
className="w-full px-5 py-4 bg-gray-50 border-2 border-gray-200 rounded-xl focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-all text-gray-900 placeholder-gray-400"
/>
Assessment
{scenario && ({scenario}
)}
Question {rowIndex + 1} of 12
{isRowComplete(rowIndex) ? (
Complete
) : (
{getRowTotal(rowIndex)}/10
)}
{row.map((characteristic, colIndex) => (
))}
{getRowTotal(rowIndex) > 0 && getRowTotal(rowIndex) !== 10 && (
Row must total 10 (currently {getRowTotal(rowIndex)})
)}
Progress
{rankings.filter((_, idx) => isRowComplete(idx)).length} of 12 complete
isRowComplete(idx)).length / 12) * 100}%` }}
/>
Your Results
{primaryTypes.join(' / ')}
{primaryTypes.map(type => fullLabels[labels.indexOf(type)]).join(' / ')}
{scenario && ({scenario}
)}
{labels.map((label, idx) => (
{totals[idx] === maxScore && (
))}
{label} — {fullLabels[idx]}
{totals[idx]}
{totals[idx] === maxScore && (
PRIMARY
)}
{descriptions[idx]}
)}Score Breakdown
{labels.map((label, idx) => (
))}
{label}
{totals[idx]}
Contact Us
Interested in working together? Fill out some info and we will be in touch shortly. We can’t wait to hear from you!