import { Block } from 'payload';

export const VisualLinkPreview: Block = {
  slug: 'visualLinkPreview',
  fields: [
    {
      name: 'url',
      type: 'text',
      required: true,
    },
    {
      name: 'title',
      type: 'text',
      required: true,
    },
    {
      name: 'summary',
      type: 'textarea',
      required: true,
    },
    {
      name: 'image',
      type: 'text',
      admin: {
        description: 'Legacy HTTP string from the old hardcoded images.',
      },
      required: false,
    },
  ],
};
