import { z } from 'zod';
import { GradialImageSchema } from './image.js';
// ---------------------------------------------------------------------------
// Zod schema
// ---------------------------------------------------------------------------
export const VideoSourceSchema = z.object({
    src: z.string().min(1),
    type: z.string().min(1),
});
export const GradialVideoSchema = z.object({
    $type: z.literal('gradial.video'),
    assetId: z.string().min(1),
    versionId: z.string().min(1),
    alt: z.string(),
    src: z.string().min(1),
    type: z.string().min(1),
    width: z.number().int().nonnegative(),
    height: z.number().int().nonnegative(),
    poster: GradialImageSchema.optional(),
    sources: z.array(VideoSourceSchema).optional(),
    duration: z.number().nonnegative().optional(),
});
