import React, { useState } from 'react'; import { Card, CardContent, CardHeader, CardTitle } from '@components/ui/card'; import { Button } from '@components/ui/button'; import { Input } from '@components/ui/input'; import { Textarea } from '@components/ui/textarea'; import { useGlobalState } from '@contexts/state/StateContext'; import { Trash2, Plus } from 'lucide-react'; import type { PathType } from '@utils/types'; const pathDefinitions = { industries: { title: 'Alternative Industries', description: 'Look across substitute and alternative industries', }, groups: { title: 'Strategic Groups', description: 'Look across strategic groups within your industry', }, buyers: { title: 'Buyer Groups', description: 'Look across chain of buyers', }, complementary: { title: 'Complementary Products', description: 'Look across complementary product and service offerings', }, functional: { title: 'Functional/Emotional Appeal', description: 'Look across functional or emotional appeal to buyers', }, trends: { title: 'Time Trends', description: 'Look across time and market trends', }, }; const SixPaths = () => { const { state, dispatch } = useGlobalState(); const [newOpportunities, setNewOpportunities] = useState< Record >({ industries: '', groups: '', buyers: '', complementary: '', functional: '', trends: '', }); const addOpportunity = (pathType: PathType) => { if (!newOpportunities[pathType]) return; dispatch({ type: 'ADD_OPPORTUNITY', payload: { pathType, value: newOpportunities[pathType], }, }); setNewOpportunities((prev) => ({ ...prev, [pathType]: '' })); }; const removeOpportunity = (pathType: PathType, index: number) => { dispatch({ type: 'SET_STATE', payload: { ...state, sixPaths: { ...state.sixPaths, [pathType]: { ...state.sixPaths[pathType], opportunities: state.sixPaths[pathType].opportunities.filter( (_, i) => i !== index ), }, }, }, }); }; const updateNotes = (pathType: PathType, notes: string) => { dispatch({ type: 'UPDATE_PATH_NOTES', payload: { pathType, notes }, }); }; const renderPath = (pathType: PathType) => { const { title, description } = pathDefinitions[pathType]; return ( {title}

{description}