import type { CollectionConfig } from 'payload'
import { hide, isAdminOrEmployee } from '@/collections/access/admin'

export const Documents: CollectionConfig = {
  slug: 'documents',
  labels: {
    plural: {
      de: "PDF-Dokumenten"
    },
    singular: {
      de: "PDF-Dokument"
    }
  },
  access: {
    read: () => true,
    update: isAdminOrEmployee(),
    delete: isAdminOrEmployee()
  },
  fields: [],
  admin: {
    hidden: hide
  },
  upload: {
    mimeTypes: ['application/pdf']
  },
}