// src/blocks/KanbanHori/config.ts
import type { Block } from 'payload'

export const KanbanHoriBlock: Block = {
  slug: 'kanbanHori',
  labels: { singular: 'Kanban (Horizontal)', plural: 'Kanbans (Horizontal)' },
  fields: [
    {
      name: 'rows',
      type: 'array',
      label: 'Rows',
      minRows: 1,
      fields: [
        {
          name: 'label',
          type: 'text',
          label: 'Row label',
          required: true,
        },
        {
          name: 'cards',
          type: 'array',
          label: 'Cards',
          fields: [
            { name: 'title', type: 'text', label: 'Title', required: true },
            { name: 'subtitle', type: 'text', label: 'Subtitle / Category' },
          ],
        },
      ],
    },
  ],
}
