import { z } from "zod/mini" import type { GroupContent } from "./group" import { GroupContentSchema } from "./group" import type { NestableContent } from "./nestable" import { NestableContentSchema } from "./nestable" import type { SlicesContent } from "./slices" import { SlicesContentSchema } from "./slices" import type { UIDContent } from "./uid" import { UIDContentSchema } from "./uid" export const WidgetContentSchema: z.ZodMiniType = z.discriminatedUnion("__TYPE__", [ GroupContentSchema, NestableContentSchema, UIDContentSchema, SlicesContentSchema, ]) export type WidgetContent = GroupContent | NestableContent | UIDContent | SlicesContent export type ContentType = WidgetContent["__TYPE__"]