import { Block } from 'payload';

export const ComparisonGrid: Block = {
  slug: 'comparisonGrid',
  fields: [
    {
      name: 'title',
      label: 'Main Heading',
      type: 'text',
      required: true,
    },
    {
      name: 'leftLabel',
      type: 'text',
      required: true,
    },
    {
      name: 'rightLabel',
      type: 'text',
      required: true,
    },
    {
      name: 'items',
      type: 'array',
      required: true,
      minRows: 1,
      fields: [
        {
          name: 'label',
          label: 'Row Label',
          type: 'text',
          required: true,
        },
        {
          name: 'leftValue',
          type: 'text',
          required: true,
        },
        {
          name: 'rightValue',
          type: 'text',
          required: true,
        },
      ],
    },
  ],
};
