import { Tab } from "payload";

export const requirements: Tab = {
  name: 'requirements',
  interfaceName: 'requirementsSection',
  label: 'Minimum requirements',
  fields: [
    {
      name: 'title',
      type: 'text',
      localized: true,
      label: 'Title',
      required: true,
    },
    {
      name: 'cards',
      type: 'array',
      required: true,
      label: 'Cards',
      interfaceName: 'requirementsCards',
      fields: [
        {
          name: 'caption',
          type: 'text',
          localized: true,
          label: 'Caption',
          required: true,
        },
        {
          name: 'photo',
          type: 'upload',
          relationTo: 'media',
          label: 'Card photo',
          required: true,
        },
      ]
    }
  ]
}