import { Tab } from "payload";

export const audience: Tab = {
  name: 'audience',
  interfaceName: 'aboutUsAudience',
  label: 'Target Audience',
  fields: [
    {
      name: 'title',
      type: 'text',
      localized: true,
      label: 'Title',
      required: true,
    },
    {
      name: 'audienceCards',
      type: 'array',
      label: 'Audience Cards',
      required: true,
      interfaceName: 'audienceCard',
      fields: [
        {
          name: 'title',
          type: 'text',
          localized: true,
          label: 'Title',
          required: true,
        },
        {
          name: 'icon',
          type: 'upload',
          relationTo: 'media',
          label: 'Icon',
          required: true,
        },
      ]
    }
  ]
}