import React, { useState } from 'react';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { ChevronRight, Check, AlertCircle } from 'lucide-react';
const BusinessJourneyDiagnostic = () => {
const [currentStage, setCurrentStage] = useState(null);
const [answers, setAnswers] = useState({});
const stages = {
gettingStarted: {
title: "Getting Started (~$200K-$1M)",
questions: [
{
id: "financialSetup",
text: "How confident are you in your current financial setup?",
options: [
"Very uncertain - not sure if it's set up correctly",
"Somewhat uncertain - basic setup but need validation",
"Fairly confident - just need some tweaks",
]
},
{
id: "profitability",
text: "How clear is your understanding of your profitability?",
options: [
"Can't tell if I'm actually making money",
"Know roughly but not confident in the numbers",
"Clear understanding but want to improve",
]
},
{
id: "planning",
text: "What's your approach to financial planning?",
options: [
"Reactive - dealing with things as they come up",
"Basic planning but need more structure",
"Have a plan but need help executing",
]
}
]
},
findingFeet: {
title: "Finding Your Feet ($1M-$3M)",
questions: [
{
id: "operations",
text: "How are you managing day-to-day financial operations?",
options: [
"Struggling to keep up with everything",
"Managing but it's taking too much time",
"Systems in place but need optimization",
]
},
{
id: "hiring",
text: "How do you make hiring decisions?",
options: [
"Based on gut feel when we're too busy",
"Look at bank balance and hope for the best",
"Have some metrics but need more confidence",
]
},
{
id: "cashFlow",
text: "How would you describe your cash flow management?",
options: [
"Feels like a rollercoaster - very unpredictable",
"Stable but causes stress and uncertainty",
"Generally good but want better forecasting",
]
}
]
},
growingStrong: {
title: "Growing Strong ($3M-$5M)",
questions: [
{
id: "strategy",
text: "How strategic is your approach to financial management?",
options: [
"Mostly tactical - focused on day-to-day",
"Mix of tactical and strategic - want more strategy",
"Strategic but need help with execution",
]
},
{
id: "opportunities",
text: "How do you identify and evaluate business opportunities?",
options: [
"Mostly reactive to what comes up",
"Look for opportunities but unsure how to evaluate",
"Have a process but want to improve",
]
},
{
id: "profitGrowth",
text: "What's your approach to increasing profits?",
options: [
"Focus on revenue, hope profit follows",
"Try to control costs but no clear strategy",
"Have targets but need help reaching them",
]
}
]
},
buildingLegacy: {
title: "Building Your Legacy ($5M+)",
questions: [
{
id: "futureVision",
text: "How clear is your vision for the future of your business?",
options: [
"Not sure what options are available",
"Have ideas but need help evaluating them",
"Clear vision but need help executing",
]
},
{
id: "advisors",
text: "How well coordinated is your advisory team?",
options: [
"Don't have a full team of advisors yet",
"Have advisors but they don't work together",
"Team in place but need better coordination",
]
},
{
id: "succession",
text: "How developed is your succession/exit strategy?",
options: [
"Haven't started planning yet",
"Beginning to think about it",
"Have a plan but need help refining it",
]
}
]
}
};
const handleStageSelect = (stage) => {
setCurrentStage(stage);
setAnswers({});
};
const handleAnswer = (questionId, answer) => {
setAnswers(prev => ({
...prev,
[questionId]: answer
}));
};
const getRecommendation = () => {
if (!currentStage || Object.keys(answers).length < stages[currentStage].questions.length) {
return null;
}
// Count how many of each answer position was selected
const answerCounts = Object.values(answers).reduce((acc, val) => {
const index = val;
acc[index] = (acc[index] || 0) + 1;
return acc;
}, {});
// Find the most common answer position
const mostCommonPosition = Object.entries(answerCounts)
.sort((a, b) => b[1] - a[1])[0][0];
const recommendations = {
gettingStarted: {
0: "A Sleep Better Financial Review would help establish strong foundations and give you clarity on your next steps.",
1: "Consider our Strategic Pricing Deep Dive to ensure your pricing supports sustainable growth.",
2: "A focused strategy session could help refine your existing setup and plan for growth."
},
findingFeet: {
0: "Our Financial Roadmap Package would help bring structure and clarity to your operations.",
1: "Regular strategic support could help you make confident decisions about hiring and growth.",
2: "A mix of project work and advisory support would help optimize your systems."
},
growingStrong: {
0: "Ongoing CFO advisory would help shift your focus from tactical to strategic.",
1: "Regular strategic support would help you evaluate opportunities and grow profits.",
2: "Our Financial Roadmap Package plus ongoing support would help execute your strategy."
},
buildingLegacy: {
0: "A comprehensive advisory package would help build your team and plan your future.",
1: "Regular strategic support would help coordinate your advisors and refine your vision.",
2: "Focused project work plus ongoing support would help execute your succession plan."
}
};
return recommendations[currentStage][mostCommonPosition];
};
return (
Business Journey Diagnostic
);
};
export default BusinessJourneyDiagnostic;
{Object.entries(stages).map(([key, stage]) => (
))}
{currentStage && (
{stages[currentStage].questions.map((question) => (
))}
{getRecommendation() && (
Recommendation
{getRecommendation()}
)}
)}
{question.text}
{question.options.map((option, index) => (
))}