import { Tab } from "payload";

export const benefits: Tab = {
  name: 'benefits',
  interfaceName: 'aboutUsBenefits',
  label: 'Benefits',
  fields: [
    {
      name: 'title',
      type: 'text',
      localized: true,
      label: 'Title',
      required: true,
    },
    {
      name: 'photo',
      type: 'upload',
      relationTo: 'media',
      label: 'Photo between bttnfits',
      required: true,
    },
    {
      name: 'items',
      type: 'array',
      label: 'Items',
      required: true,
      interfaceName: 'benefitsItems',
      fields: [
        {
          name: 'title',
          type: 'text',
          localized: true,
          label: 'Title',
          required: true,
        },
        {
          name: 'subtitle',
          type: 'text',
          localized: true,
          label: 'Subtitle',
          required: true,
        },
        {
          name: 'icon',
          type: 'upload',
          relationTo: 'media',
          label: 'Item icon',
          required: true,
        },
      ],
    }
  ]
}