import { FormControl, FormControlLabel, FormLabel, Grid, Radio, RadioGroup, TextField } from "@mui/material"; import React, { useEffect } from "react"; interface Patient { hobbies: string; educationLevel: string; excercise: string; excerciseExplanation: string; tobacco: string; tobaccoExplanation: string; alcohol: string; alcoholExplanation: string; healthyDiet: string; healthyDietExplanation: string; sleep: string; sleepExplanation: string; workSchool: string; workSchoolExplanation: string; familyLife: string; familyLifeExplanation: string; drugs: string; drugsExplanation:string; } type Props = { handleFormSection7Data:( hobbies: string|undefined, educationLevel: string|undefined, excercise: string|undefined, excerciseExplanation: string|undefined, tobacco: string|undefined, tobaccoExplanation: string|undefined, alcohol: string|undefined, alcoholExplanation: string|undefined, healthyDiet: string|undefined, healthyDietExplanation: string|undefined, sleep: string|undefined, sleepExplanation: string|undefined, workSchool: string|undefined, workSchoolExplanation: string|undefined, familyLife: string|undefined, familyLifeExplanation: string|undefined, drugs: string|undefined, drugsExplanation:string|undefined, )=> void patientDataDiplay:any; type:string; } export default function RecreationalHobbiesSection7({handleFormSection7Data,patientDataDiplay,type}:Props){ const [patient, setPatient] = React.useState({ hobbies: '', educationLevel: '', excercise:'', excerciseExplanation:'', tobacco: '', tobaccoExplanation:'', alcohol: '', alcoholExplanation:'', healthyDiet: '', healthyDietExplanation:'', sleep: '', sleepExplanation: '', workSchool: '', workSchoolExplanation:'', familyLife: '', familyLifeExplanation:'', drugs: '', drugsExplanation:'' }); useEffect(()=>{ handleFormSection7Data( patient.hobbies, patient.educationLevel, patient.excercise, patient.excerciseExplanation, patient.tobacco, patient.tobaccoExplanation, patient.alcohol, patient.alcoholExplanation, patient.healthyDiet, patient.healthyDietExplanation, patient.sleep, patient.sleepExplanation, patient.workSchool, patient.workSchoolExplanation, patient.familyLife, patient.familyLifeExplanation, patient.drugs, patient.drugsExplanation ) },[patient]) return( <> Recreational Activities/Hobbies:

{ setPatient((prevValues) => ({ ...prevValues, hobbies: event.target.value, })); }} />
Your education level: { setPatient((prevValues) => ({ ...prevValues, educationLevel: event.target.value, })); }} > } label="High School" /> } label="Some college" /> } label="College Graduate" /> } label="Post college" /> } label="Other" /> Do you excercise? { setPatient((prevValues) => ({ ...prevValues, excercise: event.target.value, })); }} > } label="Yes" /> } label="No" /> { setPatient((prevValues) => ({ ...prevValues, excerciseExplanation: event.target.value, })); }} /> Use tobacco? { setPatient((prevValues) => ({ ...prevValues, tobacco: event.target.value, })); }} > } label="Yes" /> } label="No" /> { setPatient((prevValues) => ({ ...prevValues, tobaccoExplanation: event.target.value, })); }} /> Consume alcohol? { setPatient((prevValues) => ({ ...prevValues, alcohol: event.target.value, })); }} > } label="Yes" /> } label="No" /> { setPatient((prevValues) => ({ ...prevValues, alcoholExplanation: event.target.value, })); }} /> Have a healthy diet? { setPatient((prevValues) => ({ ...prevValues, healthyDiet: event.target.value, })); }} > } label="Yes" /> } label="No" /> { setPatient((prevValues) => ({ ...prevValues, healthyDietExplanation: event.target.value, })); }} /> Get adequate sleep? { setPatient((prevValues) => ({ ...prevValues, sleep: event.target.value, })); }} > } label="Yes" /> } label="No" /> { setPatient((prevValues) => ({ ...prevValues, sleepExplanation: event.target.value, })); }} /> Is Work/School stressful to you? { setPatient((prevValues) => ({ ...prevValues, workSchool: event.target.value, })); }} > } label="Yes" /> } label="No" /> { setPatient((prevValues) => ({ ...prevValues, workSchool: event.target.value, })); }} /> Family life stressful to you? { setPatient((prevValues) => ({ ...prevValues, familyLife: event.target.value, })); }} > } label="Yes" /> } label="No" /> { setPatient((prevValues) => ({ ...prevValues, familyLifeExplanation: event.target.value, })); }} /> Use recreational drugs? { setPatient((prevValues) => ({ ...prevValues, drugs: event.target.value, })); }} > } label="Yes" /> } label="No" /> { setPatient((prevValues) => ({ ...prevValues, drugsExplanation: event.target.value, })); }} />
) }