import z from "zod";
import type { ComponentType } from "react";
import type { HydratedTheme } from "@riverbankcms/theme-core/schema";
declare module 'zod' {
    interface GlobalMeta {
        id?: string;
        title?: string;
        description?: string;
        widget?: 'text' | 'textarea' | 'select' | 'radio' | 'switch' | 'image' | 'color' | 'url' | 'internalLink' | 'externalUrl' | 'date' | 'datetime' | 'slug' | 'richtext' | 'reference' | 'button' | 'object' | 'array' | 'number' | 'media' | 'embed';
        previewAspectRatio?: string;
        placeholder?: string;
        options?: ReadonlyArray<{
            label: string;
            value: string | number;
        }>;
        group?: string;
        order?: number;
        width?: '1/3' | '1/2' | '2/3' | 'full';
        hidden?: boolean | ((formValue: unknown) => boolean);
        readOnly?: boolean | ((formValue: unknown) => boolean);
    }
}
export declare const BlockKind: z.ZodString;
export declare const blockSchema: z.ZodObject<{
    id: z.ZodNullable<z.ZodString>;
    kind: z.ZodString;
    purpose: z.ZodString;
    content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    draftContent: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
    bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
export declare const pagePath: z.ZodString;
export declare const pageOutlineSchema: z.ZodObject<{
    name: z.ZodString;
    path: z.ZodString;
    purpose: z.ZodString;
    blocks: z.ZodArray<z.ZodObject<{
        id: z.ZodNullable<z.ZodString>;
        kind: z.ZodString;
        purpose: z.ZodString;
        content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        draftContent: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
        bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$loose>>;
}, z.core.$strip>;
export type BlockDefinition<T extends z.ZodRawShape> = {
    component: ComponentType<z.infer<z.ZodObject<T>>>;
    schema: z.ZodObject<T>;
    meta: BlockMeta<T>;
};
export type BlockMeta<T extends z.ZodRawShape> = {
    id: string;
    title: string;
    description?: string;
    deprecated: boolean;
    version: string;
    preview: (props: z.infer<z.ZodObject<T>>) => {
        title: string;
        image: string | undefined | null;
    };
};
export declare function defineBlock<T extends z.ZodRawShape>(shape: T, meta: BlockMeta<T>, component?: ComponentType<z.infer<z.ZodObject<T>>>): BlockDefinition<T>;
export type BlockKind = z.infer<typeof BlockKind>;
export type Block = z.infer<typeof blockSchema>;
export type PageOutline = z.infer<typeof pageOutlineSchema>;
export type WithContent<T> = T & {
    content: Record<string, unknown>;
};
export type BlockProps<T> = T & {
    id?: string;
    theme: HydratedTheme;
    usePlaceholder?: boolean;
};
