import type { CollectionConfig } from 'payload'

export const Media: CollectionConfig = {
  slug: 'media',
  access: {
    read: () => true,
  },
  fields: [
    {
      name: 'alt',
      type: 'text',
      required: true,
    },
    {
      name: 'search',
      type: 'text',
      label: {
        de: "Suchbegriffe"
      }
    }
  ],
  upload: {
    imageSizes: [
      {
        name: 'thumbnail',
        width: 350,
        height: 350,
        position: 'centre',
      },
      {
        name: 'banner',
        width: 1100,
        height: 400,
        position: 'centre',
      },
      {
        name: 'gallery',
        height: 500,
        width: undefined,
        position: 'centre',
      },
      {
        name: 'tablet',
        width: 1024,
        height: undefined,
        position: 'centre',
      },
    ],
    mimeTypes: ['image/*'],
  },
}
