import React from "react"; import * as z from "zod"; import { ImageSchema, IconSchema } from "@/presentation-templates/defaultSchemes"; export const layoutId = "problem-statement-slide"; export const layoutName = "Problem Statement Slide"; export const layoutDescription = "A slide layout designed to present a clear problem statement, including categories of problems, company information, and an optional image."; const problemStatementSlideSchema = z.object({ title: z.string().min(3).max(20).default("Problem").meta({ description: "Main title of the problem statement slide", }), description: z .string() .min(50) .max(200) .default( "A problem needs to be discussed further and in detail because this problem is the main foundation in the initial development of a product, service, and decision making. Without a well-defined problem, it will have an impact on a job that is unfocused, unmanaged, and less relevant.", ) .meta({ description: "Main content text describing the problem statement", }), problemCategories: z .array( z.object({ title: z.string().min(3).max(30).meta({ description: "Title of the problem category", }), description: z.string().min(20).max(100).meta({ description: "Description of the problem category", }), icon: IconSchema.optional().meta({ description: "Optional icon for the problem category", }), }), ) .min(2) .max(3) .default([ { title: "Inefficiency", description: "Businesses struggle to find digital tools that meet their needs, causing operational slowdowns.", icon: { __icon_url__: "/static/icons/placeholder.png", __icon_query__: "warning alert inefficiency", }, }, { title: "High Costs", description: "Outdated systems increase expenses, while small businesses struggle to expand their market reach.", icon: { __icon_url__: "/static/icons/placeholder.png", __icon_query__: "trending up costs chart", }, }, { title: "Inefficiency", description: "Businesses struggle to find digital tools that meet their needs, causing operational slowdowns.", icon: { __icon_url__: "/static/icons/placeholder.png", __icon_query__: "warning alert inefficiency", }, }, { title: "Inefficiency", description: "Businesses struggle to find digital tools that meet their needs, causing operational slowdowns.", icon: { __icon_url__: "/static/icons/placeholder.png", __icon_query__: "warning alert inefficiency", }, }, ]) .meta({ description: "List of problem categories with titles, descriptions, and optional icons", }), companyName: z.string().min(2).max(50).default("presenton").meta({ description: "Company name displayed in header", }), date: z.string().min(5).max(30).default("June 13, 2038").meta({ description: "Today Date displayed in header", }), }); export const Schema = problemStatementSlideSchema; export type ProblemStatementSlideData = z.infer< typeof problemStatementSlideSchema >; interface ProblemStatementSlideLayoutProps { data?: Partial; } const ProblemStatementSlideLayout: React.FC< ProblemStatementSlideLayoutProps > = ({ data: slideData }) => { const problemCategories = slideData?.problemCategories || []; return ( <> {/* Import fonts */}
{/* Header */}
{slideData?.companyName} {slideData?.date}
{/* Main content area */}
{/* Left side - Main Problem */}

{slideData?.title}

{slideData?.description}
{/* Right side - Problem Categories with Icons */}
{problemCategories.map((category, index) => (
{category.icon?.__icon_url__ && ( {category.icon?.__icon_query__} )}

{category.title}

{category.description}

))}
{/* Bottom border line */}
); }; export default ProblemStatementSlideLayout;