import { AnimatedImage } from './AnimatedImage';
import { Callout } from './Callout';
import { CategoryGrid } from './CategoryGrid';
import { ChatBubble } from './ChatBubble';
import { ComparisonGrid } from './ComparisonGrid';
import { ContactSection } from './ContactSection';
import { HeroSection } from './HeroSection';
import { HighlightBox } from './HighlightBox';
import { ImageGallery } from './ImageGallery';
import { ManifestoGrid } from './ManifestoGrid';
import { PowerCTA } from './PowerCTA';
import { ProductTabs } from './ProductTabs';
import { SplitHeading } from './SplitHeading';
import { Stats } from './Stats';
import { StickyNarrative } from './StickyNarrative';
import { TeamProfile } from './TeamProfile';
import { TechnicalGrid } from './TechnicalGrid';
import { VisualLinkPreview } from './VisualLinkPreview';
import { PDFDownload } from './PDFDownload';
import { TeamGrid } from './TeamGrid';
import { JobListingBlock } from './JobListing';
import { CompanyTimelineBlock } from './CompanyTimeline';
import { SupportCTA } from './SupportCTA';
import { homeBlocksArray } from './HomeBlocks';
import { EtibBlock } from './types';

/**
 * All blocks including their React 'render' property.
 * Used by the frontend renderer (PayloadRichText.tsx).
 */
export const allBlocks: EtibBlock[] = [
  ...homeBlocksArray,
  AnimatedImage,
  Callout,
  CategoryGrid,
  ChatBubble,
  ComparisonGrid,
  ContactSection,
  HeroSection,
  HighlightBox,
  ImageGallery,
  ManifestoGrid,
  PowerCTA,
  ProductTabs,
  SplitHeading,
  Stats,
  StickyNarrative,
  TeamProfile,
  TechnicalGrid,
  VisualLinkPreview,
  PDFDownload,
  TeamGrid,
  JobListingBlock,
  CompanyTimelineBlock,
  SupportCTA,
];

/**
 * Blocks stripped of the 'render' property.
 * Used by Payload CMS configuration to avoid importing React components into the server build.
 */
export const payloadBlocks = allBlocks.map(({ render, ...block }) => block);
