'use client' import React from 'react' import type { Page, Media } from '../../payload-types' import Image from 'next/image' import { ArrowLink } from '../../components/ArrowLink' type Props = Extract[0], { blockType: 'process' }> export const ProcessBlock: React.FC = ({ subtitle, title, steps, ctaText, ctaUrl, image }) => { const processMedia = typeof image === 'object' && image !== null ? (image as Media) : null; const imageUrl = processMedia?.url || 'https://images.unsplash.com/photo-1611162617474-5b21e879e113?auto=format&fit=crop&w=1200&q=80'; const imageAlt = processMedia?.alt || 'Proces współpracy'; return (

{title}

{subtitle && (

{subtitle}

)}
{steps?.map((step: NonNullable[0], index: number) => { const stepNumber = String(index + 1).padStart(2, '0') return (
{stepNumber}

{step.title}

{step.description}

) })} {ctaText && (
{ctaText}
)}
{imageAlt}
) }