import { z } from 'zod';

interface BrandTokens {
    primaryColor: string;
    accentColor: string;
    textColor: string;
    fontFamily: string;
    logoUrl?: string;
    businessName: string;
    voice: string;
}
type AssetFormat = 'email' | 'image:feed' | 'image:story' | 'image:carousel' | 'video:reel' | 'video:feed' | 'copy:caption' | 'copy:headline' | 'copy:sms';
type AssetStatus = 'draft' | 'pending_review' | 'approved' | 'rejected' | 'scheduled' | 'published';
interface EmailHeroSection {
    type: 'hero';
    headline: string;
    subheadline?: string;
    imageUrl?: string;
    ctaLabel?: string;
    ctaUrl?: string;
}
interface EmailBodySection {
    type: 'body';
    text: string;
}
interface EmailFeatureSection {
    type: 'feature';
    headline: string;
    description: string;
    imageUrl?: string;
}
interface EmailTestimonialSection {
    type: 'testimonial';
    quote: string;
    author: string;
    role?: string;
    avatarUrl?: string;
}
interface EmailCtaSection {
    type: 'cta';
    label: string;
    url: string;
    subtext?: string;
}
interface EmailDividerSection {
    type: 'divider';
}
type EmailSection = EmailHeroSection | EmailBodySection | EmailFeatureSection | EmailTestimonialSection | EmailCtaSection | EmailDividerSection;
interface EmailContent {
    subject: string;
    preheader?: string;
    sections: EmailSection[];
}
type ImageLayerType = 'text' | 'image' | 'shape' | 'logo';
interface ImageTextLayer {
    type: 'text';
    text: string;
    fontSize?: number;
    fontWeight?: 'normal' | 'bold';
    color?: string;
    x: number;
    y: number;
    width?: number;
    align?: 'left' | 'center' | 'right';
}
interface ImageImageLayer {
    type: 'image';
    url: string;
    x: number;
    y: number;
    width: number;
    height: number;
    opacity?: number;
}
interface ImageShapeLayer {
    type: 'shape';
    shape: 'rect' | 'circle' | 'rounded-rect';
    x: number;
    y: number;
    width: number;
    height: number;
    fill?: string;
    opacity?: number;
}
interface ImageLogoLayer {
    type: 'logo';
    x: number;
    y: number;
    width?: number;
}
type ImageLayer = ImageTextLayer | ImageImageLayer | ImageShapeLayer | ImageLogoLayer;
type ImageBackground = {
    type: 'color';
    value: string;
} | {
    type: 'gradient';
    from: string;
    to: string;
    direction?: string;
} | {
    type: 'image';
    url: string;
    overlay?: string;
    overlayOpacity?: number;
};
interface ImageSlide {
    background: ImageBackground;
    layers: ImageLayer[];
}
interface ImageContent {
    slides: ImageSlide[];
}
interface VideoTextAnimationScene {
    type: 'text-animation';
    durationSeconds: number;
    headline: string;
    subtext?: string;
    animation?: 'fade' | 'slide-up' | 'typewriter';
    background?: ImageBackground;
}
interface VideoImageRevealScene {
    type: 'image-reveal';
    durationSeconds: number;
    imageUrl: string;
    caption?: string;
}
interface VideoSlideScene {
    type: 'slide';
    durationSeconds: number;
    slide: ImageSlide;
}
interface VideoCountdownScene {
    type: 'countdown';
    durationSeconds: number;
    from: number;
    label?: string;
}
type VideoScene = VideoTextAnimationScene | VideoImageRevealScene | VideoSlideScene | VideoCountdownScene;
interface VideoCaption {
    startSeconds: number;
    endSeconds: number;
    text: string;
}
interface VideoContent {
    durationSeconds: number;
    scenes: VideoScene[];
    audioUrl?: string;
    captions?: VideoCaption[];
    renderedUrl?: string;
}
type CopyPlatform = 'instagram' | 'tiktok' | 'x' | 'linkedin' | 'sms' | 'email-subject';
interface CopyContent {
    headline: string;
    body: string;
    hashtags?: string[];
    platform: CopyPlatform;
    characterCount?: number;
}
type AssetContentMap = {
    email: EmailContent;
    'image:feed': ImageContent;
    'image:story': ImageContent;
    'image:carousel': ImageContent;
    'video:reel': VideoContent;
    'video:feed': VideoContent;
    'copy:caption': CopyContent;
    'copy:headline': CopyContent;
    'copy:sms': CopyContent;
};
interface AssetSpec<F extends AssetFormat = AssetFormat> {
    id: string;
    workspaceId: string;
    campaignId?: string;
    format: F;
    brand: BrandTokens;
    content: AssetContentMap[F];
    status: AssetStatus;
    scheduledAt?: string;
    createdAt: string;
    updatedAt: string;
}
interface AssetVariant {
    id: string;
    parentId: string;
    label: string;
    spec: AssetSpec;
    approvedAt?: string;
    rejectedAt?: string;
    editLog: ApprovalEvent[];
}
interface ApprovalEvent {
    assetId: string;
    variantId?: string;
    action: 'approved' | 'rejected' | 'edited' | 'scheduled';
    editedFields?: string[];
    userId: string;
    timestamp: string;
}
interface ConversionMetrics {
    impressions: number;
    clicks: number;
    conversions: number;
    ctr: number;
    cvr: number;
}

declare const BrandTokensSchema: z.ZodObject<{
    primaryColor: z.ZodString;
    accentColor: z.ZodString;
    textColor: z.ZodString;
    fontFamily: z.ZodString;
    logoUrl: z.ZodOptional<z.ZodString>;
    businessName: z.ZodString;
    voice: z.ZodString;
}, z.core.$strip>;
declare const EmailContentSchema: z.ZodObject<{
    subject: z.ZodString;
    preheader: z.ZodOptional<z.ZodString>;
    sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"hero">;
        headline: z.ZodString;
        subheadline: z.ZodOptional<z.ZodString>;
        imageUrl: z.ZodOptional<z.ZodString>;
        ctaLabel: z.ZodOptional<z.ZodString>;
        ctaUrl: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"body">;
        text: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"feature">;
        headline: z.ZodString;
        description: z.ZodString;
        imageUrl: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"testimonial">;
        quote: z.ZodString;
        author: z.ZodString;
        role: z.ZodOptional<z.ZodString>;
        avatarUrl: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"cta">;
        label: z.ZodString;
        url: z.ZodString;
        subtext: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"divider">;
    }, z.core.$strip>], "type">>;
}, z.core.$strip>;
declare const ImageContentSchema: z.ZodObject<{
    slides: z.ZodArray<z.ZodObject<{
        background: z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"color">;
            value: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"gradient">;
            from: z.ZodString;
            to: z.ZodString;
            direction: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"image">;
            url: z.ZodString;
            overlay: z.ZodOptional<z.ZodString>;
            overlayOpacity: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>], "type">;
        layers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"text">;
            text: z.ZodString;
            fontSize: z.ZodOptional<z.ZodNumber>;
            fontWeight: z.ZodOptional<z.ZodEnum<{
                bold: "bold";
                normal: "normal";
            }>>;
            color: z.ZodOptional<z.ZodString>;
            x: z.ZodNumber;
            y: z.ZodNumber;
            width: z.ZodOptional<z.ZodNumber>;
            align: z.ZodOptional<z.ZodEnum<{
                left: "left";
                center: "center";
                right: "right";
            }>>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"image">;
            url: z.ZodString;
            x: z.ZodNumber;
            y: z.ZodNumber;
            width: z.ZodNumber;
            height: z.ZodNumber;
            opacity: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"shape">;
            shape: z.ZodEnum<{
                rect: "rect";
                circle: "circle";
                "rounded-rect": "rounded-rect";
            }>;
            x: z.ZodNumber;
            y: z.ZodNumber;
            width: z.ZodNumber;
            height: z.ZodNumber;
            fill: z.ZodOptional<z.ZodString>;
            opacity: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"logo">;
            x: z.ZodNumber;
            y: z.ZodNumber;
            width: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>], "type">>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const VideoContentSchema: z.ZodObject<{
    durationSeconds: z.ZodNumber;
    scenes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"text-animation">;
        durationSeconds: z.ZodNumber;
        headline: z.ZodString;
        subtext: z.ZodOptional<z.ZodString>;
        animation: z.ZodOptional<z.ZodEnum<{
            fade: "fade";
            "slide-up": "slide-up";
            typewriter: "typewriter";
        }>>;
        background: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"color">;
            value: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"gradient">;
            from: z.ZodString;
            to: z.ZodString;
            direction: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"image">;
            url: z.ZodString;
            overlay: z.ZodOptional<z.ZodString>;
            overlayOpacity: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>], "type">>;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"image-reveal">;
        durationSeconds: z.ZodNumber;
        imageUrl: z.ZodString;
        caption: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"slide">;
        durationSeconds: z.ZodNumber;
        slide: z.ZodObject<{
            background: z.ZodDiscriminatedUnion<[z.ZodObject<{
                type: z.ZodLiteral<"color">;
                value: z.ZodString;
            }, z.core.$strip>, z.ZodObject<{
                type: z.ZodLiteral<"gradient">;
                from: z.ZodString;
                to: z.ZodString;
                direction: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>, z.ZodObject<{
                type: z.ZodLiteral<"image">;
                url: z.ZodString;
                overlay: z.ZodOptional<z.ZodString>;
                overlayOpacity: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>], "type">;
            layers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                type: z.ZodLiteral<"text">;
                text: z.ZodString;
                fontSize: z.ZodOptional<z.ZodNumber>;
                fontWeight: z.ZodOptional<z.ZodEnum<{
                    bold: "bold";
                    normal: "normal";
                }>>;
                color: z.ZodOptional<z.ZodString>;
                x: z.ZodNumber;
                y: z.ZodNumber;
                width: z.ZodOptional<z.ZodNumber>;
                align: z.ZodOptional<z.ZodEnum<{
                    left: "left";
                    center: "center";
                    right: "right";
                }>>;
            }, z.core.$strip>, z.ZodObject<{
                type: z.ZodLiteral<"image">;
                url: z.ZodString;
                x: z.ZodNumber;
                y: z.ZodNumber;
                width: z.ZodNumber;
                height: z.ZodNumber;
                opacity: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>, z.ZodObject<{
                type: z.ZodLiteral<"shape">;
                shape: z.ZodEnum<{
                    rect: "rect";
                    circle: "circle";
                    "rounded-rect": "rounded-rect";
                }>;
                x: z.ZodNumber;
                y: z.ZodNumber;
                width: z.ZodNumber;
                height: z.ZodNumber;
                fill: z.ZodOptional<z.ZodString>;
                opacity: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>, z.ZodObject<{
                type: z.ZodLiteral<"logo">;
                x: z.ZodNumber;
                y: z.ZodNumber;
                width: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>], "type">>;
        }, z.core.$strip>;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"countdown">;
        durationSeconds: z.ZodNumber;
        from: z.ZodNumber;
        label: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>], "type">>;
    audioUrl: z.ZodOptional<z.ZodString>;
    captions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        startSeconds: z.ZodNumber;
        endSeconds: z.ZodNumber;
        text: z.ZodString;
    }, z.core.$strip>>>;
    renderedUrl: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const CopyContentSchema: z.ZodObject<{
    headline: z.ZodString;
    body: z.ZodString;
    hashtags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    platform: z.ZodEnum<{
        instagram: "instagram";
        tiktok: "tiktok";
        x: "x";
        linkedin: "linkedin";
        sms: "sms";
        "email-subject": "email-subject";
    }>;
    characterCount: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const ApprovalEventSchema: z.ZodObject<{
    assetId: z.ZodString;
    variantId: z.ZodOptional<z.ZodString>;
    action: z.ZodEnum<{
        approved: "approved";
        rejected: "rejected";
        scheduled: "scheduled";
        edited: "edited";
    }>;
    editedFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
    userId: z.ZodString;
    timestamp: z.ZodString;
}, z.core.$strip>;
declare const ConversionMetricsSchema: z.ZodObject<{
    impressions: z.ZodNumber;
    clicks: z.ZodNumber;
    conversions: z.ZodNumber;
    ctr: z.ZodNumber;
    cvr: z.ZodNumber;
}, z.core.$strip>;
/**
 * Validates an unknown value as an AssetSpec, including format-specific
 * content validation. Throws ZodError on invalid input.
 */
declare function parseAssetSpec(raw: unknown): AssetSpec;
/**
 * Safe parse — returns null instead of throwing.
 */
declare function safeParseAssetSpec(raw: unknown): AssetSpec | null;

export { type ApprovalEvent, ApprovalEventSchema, type AssetContentMap, type AssetFormat, type AssetSpec, type AssetStatus, type AssetVariant, type BrandTokens, BrandTokensSchema, type ConversionMetrics, ConversionMetricsSchema, type CopyContent, CopyContentSchema, type CopyPlatform, type EmailBodySection, type EmailContent, EmailContentSchema, type EmailCtaSection, type EmailDividerSection, type EmailFeatureSection, type EmailHeroSection, type EmailSection, type EmailTestimonialSection, type ImageBackground, type ImageContent, ImageContentSchema, type ImageImageLayer, type ImageLayer, type ImageLayerType, type ImageLogoLayer, type ImageShapeLayer, type ImageSlide, type ImageTextLayer, type VideoCaption, type VideoContent, VideoContentSchema, type VideoCountdownScene, type VideoImageRevealScene, type VideoScene, type VideoSlideScene, type VideoTextAnimationScene, parseAssetSpec, safeParseAssetSpec };
