import { GlobalConfig } from 'payload'
import { faqSection } from '../home/tabs/faq'
import { conditions } from './tabs/сonditions'

const RentalTerms: GlobalConfig = {
  slug: 'rental-terms',
  fields: [
    {
      type: 'tabs',
      tabs: [
        {
          name: 'hero',
          interfaceName: 'rentalTermsHero',
          label: 'Hero',
          fields: [
            {
              name: 'bg',
              type: 'upload',
              relationTo: 'media',
              label: 'Background',
              required: true,
            },
          ]
        },
        faqSection,
        conditions,
      ]
    }
  ],
  admin: {
    group: 'Pages',
  },
  access: {
    read: () => true,
  },
}

export { RentalTerms }
