import type { Block } from 'payload'

export const QuoteBlock: Block = {
  slug: 'quote-block',
  labels: {
    singular: 'Zitat',
    plural: 'Zitate',
  },
  fields: [
    {
      name: 'quote',
      type: 'textarea',
      required: true,
      label: 'Zitat',
      localized: true,
    },
    {
      name: 'author',
      type: 'text',
      label: 'Autor',
      // Author bleibt nicht lokalisiert - Namen sind sprachunabhängig
    },
    {
      name: 'role',
      type: 'text',
      label: 'Rolle/Position',
      localized: true,
    },
    {
      name: 'image',
      type: 'upload',
      relationTo: 'media',
      label: 'Autorenbild',
    },
    {
      name: 'style',
      type: 'select',
      defaultValue: 'simple',
      label: 'Stil',
      options: [
        { label: 'Einfach', value: 'simple' },
        { label: 'Hervorgehoben', value: 'highlighted' },
        { label: 'Mit Bild', value: 'with-image' },
      ],
    },
  ],
}
