import { Tab } from 'payload'

export const hero: Tab = {
  name: 'hero',
  interfaceName: 'heroSection',
  label: 'Hero',
  fields: [
    {
      name: 'title',
      type: 'text',
      localized: true,
      label: 'Title',
      required: true,
    },
    {
      name: 'subtitle',
      type: 'text',
      localized: true,
      label: 'Subtitle',
      required: true,
    },
    {
      name: 'btn',
      type: 'text',
      localized: true,
      label: 'Button text',
      required: true,
    },
    {
      name: 'link',
      type: 'group',
      label: 'Link',
      fields: [
        {
          name: 'text',
          type: 'text',
          localized: true,
          label: 'Text',
          required: true,
        },
        {
          name: 'url',
          type: 'text',
          label: 'URL',
          required: true,
        },
      ],
    },

    {
      name: 'bg',
      type: 'upload',
      relationTo: 'media',
      label: 'Background',
      required: true,
    },
  ],
}
