import type { Block } from 'payload'

export const VideoBlock: Block = {
  slug: 'video-block',
  labels: {
    singular: 'Video',
    plural: 'Videos',
  },
  fields: [
    {
      name: 'videoUrl',
      type: 'text',
      required: true,
      label: 'Video-URL',
      admin: {
        description: 'YouTube oder Vimeo URL',
      },
    },
    {
      name: 'caption',
      type: 'text',
      label: 'Beschriftung',
      localized: true,
    },
    {
      name: 'aspectRatio',
      type: 'select',
      defaultValue: '16:9',
      label: 'Seitenverhältnis',
      options: [
        { label: '16:9', value: '16:9' },
        { label: '4:3', value: '4:3' },
        { label: '1:1', value: '1:1' },
      ],
    },
  ],
}
