/** * Medication Plan Assistant - Main Application * * A pharmacokinetic simulation tool for lisdexamfetamine (Elvanse/Vyvanse) * medication planning. Helps users visualize drug concentration profiles, * manage deviations, and get dose correction suggestions. * * @author Andreas Weyer * @license MIT */ import React from 'react'; // Components import DaySchedule from './components/day-schedule'; import SimulationChart from './components/simulation-chart'; import Settings from './components/settings'; import LanguageSelector from './components/language-selector'; import { Button } from './components/ui/button'; // Custom Hooks import { useAppState } from './hooks/useAppState'; import { useSimulation } from './hooks/useSimulation'; import { useLanguage } from './hooks/useLanguage'; // --- Main Component --- const MedPlanAssistant = () => { const { currentLanguage, t, changeLanguage } = useLanguage(); const { appState, updateNestedState, updateUiSetting, handleReset, addDay, removeDay, addDoseToDay, removeDoseFromDay, updateDoseInDay } = useAppState(); const { pkParams, days, therapeuticRange, doseIncrement, uiSettings } = appState; const { showDayTimeOnXAxis, chartView, yAxisMin, yAxisMax, showTemplateDay, simulationDays, displayedDays } = uiSettings; const { combinedProfile, templateProfile } = useSimulation(appState); return (
{t.appSubtitle}