'use strict';

const z = require('zod');

const uiBuilderPageSchema = z.z.object({
  /** JSON-serialized ComponentLayer[] representing the page structure */
  layers: z.z.string().meta({ fieldType: "textarea" }),
  /** JSON-serialized Variable[] for dynamic content */
  variables: z.z.string().default("[]").meta({ fieldType: "textarea" }),
  /** Page publication status */
  status: z.z.enum(["published", "draft", "archived"]).default("draft").meta({ fieldType: "select" })
});
const UI_BUILDER_CONTENT_TYPE = {
  name: "UI Builder Page",
  slug: "ui-builder-page",
  description: "Visual drag-and-drop page builder pages",
  schema: uiBuilderPageSchema
};
const UI_BUILDER_TYPE_SLUG = "ui-builder-page";

exports.UI_BUILDER_CONTENT_TYPE = UI_BUILDER_CONTENT_TYPE;
exports.UI_BUILDER_TYPE_SLUG = UI_BUILDER_TYPE_SLUG;
exports.uiBuilderPageSchema = uiBuilderPageSchema;
