import * as z from "zod"; export const slideLayoutId = "table-of-content-slide"; export const slideLayoutName = "Table Of Content Slide"; export const slideLayoutDescription = "A two-column table of contents with numbered entries, labels and description."; export const Schema = z.object({ title: z.string().min(8).max(24).default("Table of Content").meta({ description: "Slide heading shown above the index list.", }), items: z .array(z.object({ number: z.string().min(2).max(2).meta({"description": "Bullet Serial Number"}), label: z.string().min(3).max(30).meta({"description": "Page/Content Name"}), description: z.string().min(3).max(100).optional().meta({"description": "Short description for the content section."}), })) .min(12) .max(12) .default([ { number: "01", label: "Content Section summary", description: "A quick brown fox jumps over a lazy dog." }, { number: "01", label: "Content Section summary", description: "A quick brown fox jumps over a lazy dog." }, { number: "01", label: "Content Section summary", description: "A quick brown fox jumps over a lazy dog." }, { number: "01", label: "Content Section summary", description: "A quick brown fox jumps over a lazy dog." }, { number: "01", label: "Content Section summary", description: "A quick brown fox jumps over a lazy dog." }, { number: "06", label: "Content 6", description: "Section summary" }, { number: "07", label: "Content 7", description: "Section summary" }, { number: "08", label: "Content 8", description: "Section summary" }, { number: "09", label: "Content 9", description: "Section summary" }, { number: "10", label: "Content 10", description: "Section summary" }, { number: "11", label: "Content 11", description: "Section summary" }, { number: "12", label: "Content 12", description: "Section summary" }, ]) .meta({ description: "Table of contents entries.", }), pageLabel: z.string().min(3).max(8).optional().default("9 / 11").meta({ description: "Bottom pagination label.", }), }); export type SchemaType = z.infer; function TocColumn({ items }: { items: { number: string; label: string, description?: string }[] }) { return (
{items.map((item, index) => { return (

{item.number}

{item.label}

{item.description &&

{item.description}

}
); })}
); } const CodeSlide09TableOfContent = ({ data }: { data: Partial }) => { const leftItems = data?.items?.slice(0, data?.items?.length / 2); const rightItems = data?.items?.slice(data?.items?.length / 2); return ( <>

{data.title}

{data.pageLabel}
); }; export default CodeSlide09TableOfContent;