import { mdiAccount, mdiChartTimelineVariant, mdiMail, mdiUpload } from '@mdi/js'
import Head from 'next/head'
import React, { ReactElement } from 'react'
import CardBox from '../../components/CardBox'
import LayoutAuthenticated from '../../layouts/Authenticated'
import SectionMain from '../../components/SectionMain'
import SectionTitleLineWithButton from '../../components/SectionTitleLineWithButton'
import { getPageTitle } from '../../config'

import { Field, Form, Formik } from 'formik'
import FormField from '../../components/FormField'
import BaseDivider from '../../components/BaseDivider'
import BaseButtons from '../../components/BaseButtons'
import BaseButton from '../../components/BaseButton'
import FormCheckRadio from '../../components/FormCheckRadio'
import FormCheckRadioGroup from '../../components/FormCheckRadioGroup'
import FormFilePicker from '../../components/FormFilePicker'
import FormImagePicker from '../../components/FormImagePicker'
import { SwitchField } from '../../components/SwitchField'

import { SelectField } from '../../components/SelectField'
import { SelectFieldMany } from "../../components/SelectFieldMany";
import {RichTextField} from "../../components/RichTextField";

import { create } from '../../stores/career_coach_reports/career_coach_reportsSlice'
import { useAppDispatch } from '../../stores/hooks'
import { useRouter } from 'next/router'
import moment from 'moment';

const initialValues = {
    
    
    
    
    
    
    
    
    
    
    
    
    
    user: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    resume_file: [],
    
    
    
    
    
    
    
    resume_text: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    current_role_text: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    target_role_text: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    clarifying_questions: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    career_path: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    skill_gaps: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    next_steps: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    resume_suggestions: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    visibility: 'private',
    
    
    
    
    
    
    
    share_token: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    generated_at: '',
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    organizations: '',
    
    
    
}


const Career_coach_reportsNew = () => {
  const router = useRouter()
  const dispatch = useAppDispatch()

    
    

  const handleSubmit = async (data) => {
    await dispatch(create(data))
    await router.push('/career_coach_reports/career_coach_reports-list')
  }
  return (
    <>
      <Head>
        <title>{getPageTitle('New Item')}</title>
      </Head>
      <SectionMain>
        <SectionTitleLineWithButton icon={mdiChartTimelineVariant} title="New Item" main>
        {''}
        </SectionTitleLineWithButton>
        <CardBox>
          <Formik
            initialValues={
                
                initialValues
                
            }
            onSubmit={(values) => handleSubmit(values)}
          >
            <Form>





















  <FormField label="User" labelFor="user">
      <Field name="user" id="user" component={SelectField} options={[]} itemRef={'users'}></Field>
  </FormField>
































  <FormField>
      <Field
          label='ResumeFile'
          color='info'
          icon={mdiUpload}
          path={'career_coach_reports/resume_file'}
          name='resume_file'
          id='resume_file'
          schema={{
            size: undefined,
            formats: undefined,
          }}
          component={FormFilePicker}
      ></Field>
  </FormField>






    <FormField label="ResumeText" hasTextareaHeight>
        <Field name="resume_text" as="textarea" placeholder="ResumeText" />
    </FormField>

























  <FormField
      label="CurrentRole"
  >
      <Field
          name="current_role_text"
          placeholder="CurrentRole"
      />
  </FormField>



























  <FormField
      label="TargetRole"
  >
      <Field
          name="target_role_text"
          placeholder="TargetRole"
      />
  </FormField>





























    <FormField label="ClarifyingQuestions" hasTextareaHeight>
        <Field name="clarifying_questions" as="textarea" placeholder="ClarifyingQuestions" />
    </FormField>





























      <FormField label='CareerPath' hasTextareaHeight>
          <Field
              name='career_path'
              id='career_path'
              component={RichTextField}
          ></Field>
      </FormField>



























      <FormField label='SkillGaps' hasTextareaHeight>
          <Field
              name='skill_gaps'
              id='skill_gaps'
              component={RichTextField}
          ></Field>
      </FormField>



























      <FormField label='RecommendedNextSteps' hasTextareaHeight>
          <Field
              name='next_steps'
              id='next_steps'
              component={RichTextField}
          ></Field>
      </FormField>



























      <FormField label='ResumeSuggestions' hasTextareaHeight>
          <Field
              name='resume_suggestions'
              id='resume_suggestions'
              component={RichTextField}
          ></Field>
      </FormField>





































  <FormField label="Visibility" labelFor="visibility">
      <Field name="visibility" id="visibility" component="select">
      
        <option value="private">private</option>
      
        <option value="shareable_link">shareable_link</option>
      
      </Field>
  </FormField>













  <FormField
      label="ShareToken"
  >
      <Field
          name="share_token"
          placeholder="ShareToken"
      />
  </FormField>





































  <FormField
      label="GeneratedAt"
  >
      <Field
          type="datetime-local"
          name="generated_at"
          placeholder="GeneratedAt"
      />
  </FormField>



































  <FormField label="organizations" labelFor="organizations">
      <Field name="organizations" id="organizations" component={SelectField} options={[]} itemRef={'organizations'}></Field>
  </FormField>







              <BaseDivider />
              <BaseButtons>
                <BaseButton type="submit" color="info" label="Submit" />
                <BaseButton type="reset" color="info" outline label="Reset" />
                <BaseButton type='reset' color='danger' outline label='Cancel' onClick={() => router.push('/career_coach_reports/career_coach_reports-list')}/>
              </BaseButtons>
            </Form>
          </Formik>
        </CardBox>
      </SectionMain>
    </>
  )
}

Career_coach_reportsNew.getLayout = function getLayout(page: ReactElement) {
  return (
      <LayoutAuthenticated
        
          permission={'CREATE_CAREER_COACH_REPORTS'}
        
      >
          {page}
      </LayoutAuthenticated>
  )
}

export default Career_coach_reportsNew
