"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pageIdSchema = exports.listPageBlocksSchema = exports.updatePageBlockSchema = exports.createPageBlockSchema = exports.listLandingPagesSchema = exports.updateLandingPageSchema = exports.createLandingPageSchema = void 0;
const zod_1 = require("zod");
const editorModeEnum = zod_1.z.enum(['VISUAL', 'CODE']);
const mkdocsExportModeEnum = zod_1.z.enum(['THEMED', 'STANDALONE']);
exports.createLandingPageSchema = zod_1.z.object({
    title: zod_1.z.string().min(1, 'Title is required'),
    description: zod_1.z.string().optional(),
    editorMode: editorModeEnum.optional().default('VISUAL'),
    blocks: zod_1.z.any().optional().default({}),
    htmlOutput: zod_1.z.string().optional(),
    cssOutput: zod_1.z.string().optional(),
    mkdocsPath: zod_1.z.string().optional(),
    mkdocsExportMode: mkdocsExportModeEnum.optional().default('THEMED'),
    mkdocsHideNav: zod_1.z.boolean().optional().default(true),
    mkdocsHideToc: zod_1.z.boolean().optional().default(true),
    mkdocsSkipExport: zod_1.z.boolean().optional().default(false),
    published: zod_1.z.boolean().optional().default(false),
    listed: zod_1.z.boolean().optional().default(false),
    seoTitle: zod_1.z.string().optional(),
    seoDescription: zod_1.z.string().optional(),
    seoImage: zod_1.z.string().optional(),
});
exports.updateLandingPageSchema = zod_1.z.object({
    title: zod_1.z.string().min(1).optional(),
    description: zod_1.z.string().nullable().optional(),
    editorMode: editorModeEnum.optional(),
    blocks: zod_1.z.any().optional(),
    htmlOutput: zod_1.z.string().nullable().optional(),
    cssOutput: zod_1.z.string().nullable().optional(),
    mkdocsPath: zod_1.z.string().nullable().optional(),
    mkdocsExportMode: mkdocsExportModeEnum.optional(),
    mkdocsHideNav: zod_1.z.boolean().optional(),
    mkdocsHideToc: zod_1.z.boolean().optional(),
    mkdocsSkipExport: zod_1.z.boolean().optional(),
    published: zod_1.z.boolean().optional(),
    listed: zod_1.z.boolean().optional(),
    seoTitle: zod_1.z.string().nullable().optional(),
    seoDescription: zod_1.z.string().nullable().optional(),
    seoImage: zod_1.z.string().nullable().optional(),
});
exports.listLandingPagesSchema = zod_1.z.object({
    page: zod_1.z.coerce.number().int().positive().default(1),
    limit: zod_1.z.coerce.number().int().positive().max(100).default(20),
    search: zod_1.z.string().optional(),
    published: zod_1.z.enum(['true', 'false']).optional(),
});
exports.createPageBlockSchema = zod_1.z.object({
    type: zod_1.z.string().min(1, 'Type is required'),
    label: zod_1.z.string().min(1, 'Label is required'),
    schema: zod_1.z.any().optional().default({}),
    defaults: zod_1.z.any().optional().default({}),
    thumbnail: zod_1.z.string().optional(),
    category: zod_1.z.string().optional(),
    sortOrder: zod_1.z.number().int().optional().default(0),
});
exports.updatePageBlockSchema = zod_1.z.object({
    type: zod_1.z.string().min(1).optional(),
    label: zod_1.z.string().min(1).optional(),
    schema: zod_1.z.any().optional(),
    defaults: zod_1.z.any().optional(),
    thumbnail: zod_1.z.string().nullable().optional(),
    category: zod_1.z.string().nullable().optional(),
    sortOrder: zod_1.z.number().int().optional(),
});
exports.listPageBlocksSchema = zod_1.z.object({
    category: zod_1.z.string().optional(),
});
exports.pageIdSchema = zod_1.z.object({
    id: zod_1.z.string().min(1),
});
//# sourceMappingURL=pages.schemas.js.map