import { z } from 'zod';

const uiBuilderPageSchema = z.object({
  /** JSON-serialized ComponentLayer[] representing the page structure */
  layers: z.string().meta({ fieldType: "textarea" }),
  /** JSON-serialized Variable[] for dynamic content */
  variables: z.string().default("[]").meta({ fieldType: "textarea" }),
  /** Page publication status */
  status: 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";

export { UI_BUILDER_CONTENT_TYPE, UI_BUILDER_TYPE_SLUG, uiBuilderPageSchema };
