import { CheckboxField } from '@components/common/form/CheckboxField.js'; import { EmailField } from '@components/common/form/EmailField.js'; import { Form, useFormContext } from '@components/common/form/Form.js'; import { InputField } from '@components/common/form/InputField.js'; import { TelField } from '@components/common/form/TelField.js'; import { TextareaField } from '@components/common/form/TextareaField.js'; import { Editable, isPageBuilderActive, useWidgetUid } from '@components/common/page-builder/index.js'; import { _ } from '@evershop/evershop/lib/locale/translate/_'; import React from 'react'; import { useForm } from 'react-hook-form'; export interface ContactFormProps { contactFormWidget: { title: string | null; subtitle: string | null; submitLabel: string | null; successMessage: string | null; showPhone: boolean | null; showSubject: boolean | null; consentEnabled: boolean | null; consentText: string | null; }; } /** * `widget_uuid` tells the API which instance produced the message; `website` is * the honeypot. Both ride in the form state so they are part of the same JSON * body `