import { Fragment } from "react"; import * as z from "zod"; const WorkflowStepSchema = z.object({ title: z.string().min(3).max(12).meta({ description: "Step title shown in each workflow card.", }), description: z.string().min(18).max(50).meta({ description: "Short step description text.", }), icon: z.object({ __icon_url__: z.string().meta({ description: "URL to icon", }), __icon_query__: z.string().meta({ description: "Query used to search the icon", }), }).default({ __icon_url__: "https://presenton-public.s3.ap-southeast-1.amazonaws.com/static/icons/placeholder.svg", __icon_query__: "check icon", }), }); export const slideLayoutId = "workflow-slide"; export const slideLayoutName = "Workflow Slide"; export const slideLayoutDescription = "A workflow slide with cards and directional arrows between steps."; export const Schema = z.object({ title: z.string().min(6).max(16).default("Workflow").meta({ description: "Slide title shown above the workflow row.", }), steps: z .array(WorkflowStepSchema) .min(1) .max(4) .default([ { title: "Design", description: "Create wireframes and design system components.", icon: { __icon_url__: "https://presenton-public.s3.ap-southeast-1.amazonaws.com/static/icons/placeholder.svg", __icon_query__: "check icon", }, }, { title: "Develop", description: "Build features using modern frameworks and best practices.", icon: { __icon_url__: "https://presenton-public.s3.ap-southeast-1.amazonaws.com/static/icons/placeholder.svg", __icon_query__: "check icon", }, }, { title: "Test & QA", description: "Run automated tests and quality assurance checks.", icon: { __icon_url__: "https://presenton-public.s3.ap-southeast-1.amazonaws.com/static/icons/placeholder.svg", __icon_query__: "check icon", }, }, { title: "Deploy", description: "Ship to production with CI and CD pipeline automation.", icon: { __icon_url__: "https://presenton-public.s3.ap-southeast-1.amazonaws.com/static/icons/placeholder.svg", __icon_query__: "check icon", }, }, ]) .meta({ description: "Workflow steps shown in sequence.", }), pageLabel: z.string().min(3).max(8).optional().default("6 / 11").meta({ description: "Bottom pagination label.", }), }); export type SchemaType = z.infer; const CodeSlide06Workflow = ({ data }: { data: Partial }) => { return ( <>

{data.title}

{data?.steps?.map((step, index) => (
{step.icon.__icon_query__}

{step.title}

{step.description}

{index < (data?.steps?.length || 0) - 1 && ( )}
))}
{data.pageLabel}
); }; export default CodeSlide06Workflow;