import React, { Fragment } from 'react';
import { FormSection } from 'redux-form';
import { withStyles } from '@material-ui/core/styles';
import Observations from './Observations/Observations';
import FormTitle from '../../../Titles/FormTitle';


const ObservationSection = ({
  checked, handleChange, classes,
}) => (
  <Fragment>
    <FormTitle
      title="Add observation?"
      switchable
      checked={checked}
      onChange={handleChange}
    />
    {checked ? (
      <FormSection name="vitals">
        <Observations />
      </FormSection>
    ) : null}


  </Fragment>
);

export default ObservationSection;
