import type { GlobalConfig } from 'payload' import { globalVersions } from '../lib/payload-versions' /** * Mirrors ContactPageContent (proto/src/content/types.ts) — MITHOME-87. * * WHY `gdpr.label` textarea és nem richText: a JSON forrás egy kézzel * beírt taget tartalmazó HTML string (lásd contact.json). A lexical * richText mező más (JSON node-fa) szerializációt használna, ami extra * migrációs/render logikát igényelne — ezt itt, bootstrap szinten nem * bontjuk ki, marad egyszerű (HTML-t tartalmazó) szöveg mező. */ export const Contact: GlobalConfig = { slug: 'contact', admin: { group: 'Oldalak', }, versions: globalVersions, fields: [ { name: 'meta', type: 'group', fields: [ { name: 'title', type: 'text', required: true, localized: true }, { name: 'description', type: 'textarea', required: true, localized: true }, ], }, { name: 'hero', type: 'group', fields: [ { name: 'title', type: 'text', required: true, localized: true }, { name: 'subtitle', type: 'text', required: true, localized: true }, ], }, { name: 'form', type: 'group', fields: [ { name: 'title', type: 'text', required: true, localized: true }, { name: 'successMessage', type: 'text', required: true, localized: true }, { name: 'errorMessage', type: 'text', required: true, localized: true }, { name: 'fields', type: 'group', fields: [ { name: 'name', type: 'group', fields: [ { name: 'label', type: 'text', required: true, localized: true }, { name: 'placeholder', type: 'text', required: true, localized: true }, { name: 'error', type: 'text', required: true, localized: true }, ], }, { name: 'email', type: 'group', fields: [ { name: 'label', type: 'text', required: true, localized: true }, { name: 'placeholder', type: 'text', required: true, localized: true }, { name: 'errorRequired', type: 'text', required: true, localized: true }, { name: 'errorInvalid', type: 'text', required: true, localized: true }, ], }, { name: 'subject', type: 'group', fields: [ { name: 'label', type: 'text', required: true, localized: true }, { name: 'placeholder', type: 'text', required: true, localized: true }, { name: 'error', type: 'text', required: true, localized: true }, ], }, { name: 'message', type: 'group', fields: [ { name: 'label', type: 'text', required: true, localized: true }, { name: 'placeholder', type: 'text', required: true, localized: true }, { name: 'errorRequired', type: 'text', required: true, localized: true }, { name: 'errorMinLength', type: 'text', required: true, localized: true }, ], }, { name: 'gdpr', type: 'group', fields: [ { name: 'label', type: 'textarea', required: true, localized: true }, { name: 'error', type: 'text', required: true, localized: true }, ], }, ], }, { name: 'submitButton', type: 'text', required: true, localized: true }, { name: 'submittingButton', type: 'text', required: true, localized: true }, ], }, { name: 'info', type: 'group', fields: [ { name: 'title', type: 'text', required: true, localized: true }, { name: 'email', type: 'group', fields: [ { name: 'title', type: 'text', required: true, localized: true }, { name: 'responseTime', type: 'text', required: true, localized: true }, ], }, { name: 'company', type: 'group', fields: [{ name: 'title', type: 'text', required: true, localized: true }], }, { name: 'webmail', type: 'group', fields: [ { name: 'title', type: 'text', required: true, localized: true }, { name: 'linkText', type: 'text', required: true, localized: true }, { name: 'subtitle', type: 'text', required: true, localized: true }, ], }, ], }, { name: 'faq', type: 'group', fields: [ { name: 'title', type: 'text', required: true, localized: true }, { name: 'items', type: 'array', fields: [ { name: 'question', type: 'text', required: true, localized: true }, { name: 'answer', type: 'textarea', required: true, localized: true }, ], }, ], }, ], }