import { Block } from 'payload'

export const TitleBlock: Block = {
  slug: 'title',
  labels: {
    singular: {
      de: 'Titel',
    },
    plural: {
      de: 'Titel',
    },
  },
  fields: [
    {
      name: 'title',
      type: 'text',
      required: true,
      label: {
        de: 'Titel',
      },
    },
    {
      name: 'subtitle',
      type: 'text',
      label: {
        de: 'Untertitel',
      },
    },
    {
      name: 'size',
      type: 'select',
      label: {
        de: 'Größe',
      },
      options: [
        { label: 'XL', value: 'xl' },
        { label: 'Groß', value: 'lg' },
        { label: 'Mittel', value: 'md' },
        { label: 'Klein', value: 'sm' },
      ],
      defaultValue: 'lg',
    },
    {
      name: 'align',
      type: 'select',
      label: {
        de: 'Ausrichtung',
      },
      options: [
        { label: 'Links', value: 'left' },
        { label: 'Zentriert', value: 'center' },
      ],
      defaultValue: 'left',
    },
    {
      name: 'color',
      type: 'select',
      label: {
        de: 'Farbe',
      },
      required: true,
      defaultValue: 'base',
      options: [
        { label: 'Grundfarbe', value: 'base' },
        { label: 'Abstufung 1', value: 'shade1' },
        { label: 'Abstufung 2', value: 'shade2' },
        { label: 'Abstufung 3', value: 'shade3' },
        { label: 'Kontrastfarbe', value: 'contrast' },
        { label: 'Kontrast Abstufung 1', value: 'contrastShade1' },
      ],
    },
  ],
}
