import React from 'react' import * as z from "zod"; import { ImageSchema, IconSchema } from './defaultSchemes'; export const layoutId = 'process-slide' export const layoutName = 'Process Slide' export const layoutDescription = 'A professional slide featuring step-by-step processes with icons, titles, and descriptions.' const processSlideSchema = z.object({ title: z.string().min(3).max(100).default('Our Process').meta({ description: "Main title of the slide", }), subtitle: z.string().min(10).max(200).optional().meta({ description: "Optional subtitle or description", }), steps: z.array(z.object({ icon: IconSchema.default({ url: 'https://cdn.pixabay.com/photo/2015/12/01/20/28/road-1072823_1280.jpg', prompt: 'Default step icon' }).meta({ description: "Icon for the step", }), title: z.string().min(2).max(50).meta({ description: "Title for the step", }), description: z.string().min(10).max(150).meta({ description: "Description of the step", }) })).min(2).max(6).default([ { icon: { url: 'https://cdn.pixabay.com/photo/2015/12/01/20/28/road-1072823_1280.jpg', prompt: 'Plan and strategy icon' }, title: 'Plan & Strategy', description: 'Define objectives, analyze requirements, and create a comprehensive roadmap' }, { icon: { url: 'https://cdn.pixabay.com/photo/2016/02/19/11/19/office-1209640_1280.jpg', prompt: 'Execute and build icon' }, title: 'Execute & Build', description: 'Implement solutions with precision using cutting-edge technology and best practices' }, { icon: { url: 'https://cdn.pixabay.com/photo/2017/08/10/08/47/laptop-2619235_1280.jpg', prompt: 'Launch and optimize icon' }, title: 'Launch & Optimize', description: 'Deploy the solution and continuously improve based on performance metrics' } ]).meta({ description: "List of process steps (2-6 items)", }), backgroundImage: ImageSchema.optional().meta({ description: "Background image for the slide", }) }) export const Schema = processSlideSchema export type ProcessSlideData = z.infer interface ProcessSlideLayoutProps { data?: Partial } const ProcessSlideLayout: React.FC = ({ data: slideData }) => { return (
{/* Header section */}

{slideData?.title || 'Our Process'}

{slideData?.subtitle && (

{slideData.subtitle}

)}
{/* Process steps section */}
{slideData?.steps?.map((step, index) => ( {/* Process Step */}
{/* Step Number and Icon */}
{index + 1}
{step.icon?.prompt
{/* Step Title */}

{step.title}

{/* Step Description */}

{step.description}

{/* Arrow between steps */} {index < (slideData?.steps?.length || 0) - 1 && (
)}
))}
{/* Bottom decorative accent */}
) } export default ProcessSlideLayout