import { Tab } from "payload";

export const whyChooseUs: Tab = {
  name: 'whyChooseUs',
  interfaceName: 'whyChooseUsSection',
  label: 'Why Choose Us',
  fields: [
    {
      name: 'title',
      type: 'text',
      localized: true,
      label: 'Title',
      required: true,
    },
    {
      name: 'cards',
      type: 'array',
      label: 'Cards',
      required: true,
      interfaceName: 'Items',
      fields: [
        {
          name: 'caption',
          type: 'text',
          localized: true,
          label: 'Item caption',
          required: true,
        },
        {
          name: 'icon',
          type: 'upload',
          relationTo: 'media',
          label: 'Item icon',
          required: true,
        },
      ]
    },
  ]
}