import React, { memo, RefObject } from 'react'; import { Modal } from 'Components/Modal'; import { areEqual } from 'Utils/equalityChecks'; import { ValidateBackGround } from 'Components/Validation'; import { PurpleButton } from 'Components/Button'; import { Label } from 'Components/Label'; import { TextBox } from 'Components/TextBox'; import { CheckBox } from 'Components/CheckBox'; import { TextArea } from 'Components/TextArea'; import { ContractFormsToast } from '../ContractFormsToast'; import classes from './contractFormsModal.module.css'; const templateTags = [ '~~~name~~~', '~~~project~~~', '~~~job_no~~~', '~~~company~~~', '~~~current_date~~~', '~~~date_of_loss~~~', '~~~company_address~~~', '~~~policy_holder_name~~~', '~~~policy_number~~~', '~~~claim_number~~~', '~~~input~~~', '~~~checkbox~~~', '~~~company_logo~~~', ]; interface Props { isOpen: boolean; formData: any; formErrors: any; title: string; submitText: string; showToast: boolean; toastMessage: string; toastType?: string; onFormSubmit: (e: any) => void; onClickClose: (e: any) => void; handleChange: (e: any) => void; textAreaRef: RefObject; handleTagClick: (tag: string) => void; submitting: boolean; } const ContractFormsModal = ({ isOpen, title, submitText, formData, formErrors, showToast, toastMessage, toastType = 'success', onFormSubmit, onClickClose, handleChange, textAreaRef, handleTagClick, submitting, }: Props) => ( } >
{formErrors?.name?.[0]}
{templateTags.map((tag) => ( ))}
{formErrors?.template?.[0] &&

{formErrors?.template?.[0]}

}