import z from 'zod';

declare const mediaSchema: z.ZodObject<{
    type: z.ZodEnum<{
        image: "image";
        video: "video";
    }>;
    purpose: z.ZodOptional<z.ZodString>;
    placeholder: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
    assetId: z.ZodOptional<z.ZodString>;
    src: z.ZodOptional<z.ZodString>;
    alt: z.ZodOptional<z.ZodString>;
    width: z.ZodOptional<z.ZodNumber>;
    height: z.ZodOptional<z.ZodNumber>;
    storageBucket: z.ZodOptional<z.ZodString>;
    storagePath: z.ZodOptional<z.ZodString>;
    transform: z.ZodOptional<z.ZodObject<{
        rect: z.ZodOptional<z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
        hotspot: z.ZodOptional<z.ZodOptional<z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
            radius: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
type Media = z.infer<typeof mediaSchema>;

/**
 * Build Zod validation schema for rich text fields
 *
 * @param options - Optional configuration
 * @param options.required - If true, validates that content is not empty
 * @param options.label - Field label for error messages (defaults to 'This field')
 * @returns Zod schema for rich text validation
 *
 * @example
 * // Basic usage
 * const schema = buildRichTextSchema()
 *
 * @example
 * // Required field with custom label
 * const schema = buildRichTextSchema({ required: true, label: 'Description' })
 */
/**
 * TypeScript type for a TipTap document node
 *
 * Use this type for rich text content fields in block definitions.
 * Defined explicitly (rather than inferred) because recursive Zod schemas
 * require `z.ZodType<any>` which loses type information.
 */
type TipTapNode = {
    type: string;
    content?: TipTapNode[];
    text?: string;
    attrs?: Record<string, unknown>;
    marks?: Array<{
        type: string;
        attrs?: Record<string, unknown>;
    }>;
};

export type { Media as M, TipTapNode as T };
