import { z } from 'zod';

/** Define brand identity tokens including colors, font, logo, business name, and voice */
interface BrandTokens {
    primaryColor: string;
    accentColor: string;
    textColor: string;
    fontFamily: string;
    logoUrl?: string;
    businessName: string;
    voice: string;
}
/** Define valid asset format strings for various media and copy types */
type AssetFormat = 'email' | 'image:feed' | 'image:story' | 'image:carousel' | 'video:reel' | 'video:feed' | 'copy:caption' | 'copy:headline' | 'copy:sms';
/** Define possible states representing the lifecycle status of an asset */
type AssetStatus = 'draft' | 'pending_review' | 'approved' | 'rejected' | 'scheduled' | 'published';
/** Define the structure for a hero section in an email with headline, image, and call-to-action fields */
interface EmailHeroSection {
    type: 'hero';
    headline: string;
    subheadline?: string;
    imageUrl?: string;
    ctaLabel?: string;
    ctaUrl?: string;
}
/** Define the structure for the body section of an email containing plain text content */
interface EmailBodySection {
    type: 'body';
    text: string;
}
/** Define a feature section with headline, description, and optional image for email content */
interface EmailFeatureSection {
    type: 'feature';
    headline: string;
    description: string;
    imageUrl?: string;
}
/** Define the structure for an email testimonial section with quote, author, and optional details */
interface EmailTestimonialSection {
    type: 'testimonial';
    quote: string;
    author: string;
    role?: string;
    avatarUrl?: string;
}
/** Define a call-to-action section with label, URL, and optional subtext for email content */
interface EmailCtaSection {
    type: 'cta';
    label: string;
    url: string;
    subtext?: string;
}
/** Define a section representing a divider in an email layout */
interface EmailDividerSection {
    type: 'divider';
}
/** Define a union type representing different sections of an email template */
type EmailSection = EmailHeroSection | EmailBodySection | EmailFeatureSection | EmailTestimonialSection | EmailCtaSection | EmailDividerSection;
/** Define the structure for email content including subject, optional preheader, and sections */
interface EmailContent {
    subject: string;
    preheader?: string;
    sections: EmailSection[];
}
/** Define image layer categories for text, image, shape, or logo elements */
type ImageLayerType = 'text' | 'image' | 'shape' | 'logo';
/** Define properties for a text layer with position, style, and alignment options in an image */
interface ImageTextLayer {
    type: 'text';
    text: string;
    fontSize?: number;
    fontWeight?: 'normal' | 'bold';
    color?: string;
    x: number;
    y: number;
    width?: number;
    align?: 'left' | 'center' | 'right';
}
/** Define properties for an image layer including position, size, URL, and optional opacity */
interface ImageImageLayer {
    type: 'image';
    url: string;
    x: number;
    y: number;
    width: number;
    height: number;
    opacity?: number;
}
/** Define properties for a shape layer representing rectangular or circular image elements */
interface ImageShapeLayer {
    type: 'shape';
    shape: 'rect' | 'circle' | 'rounded-rect';
    x: number;
    y: number;
    width: number;
    height: number;
    fill?: string;
    opacity?: number;
}
/** Define properties for positioning and sizing a logo image layer in a layout */
interface ImageLogoLayer {
    type: 'logo';
    x: number;
    y: number;
    width?: number;
}
/** Resolve a union type representing different kinds of image layers */
type ImageLayer = ImageTextLayer | ImageImageLayer | ImageShapeLayer | ImageLogoLayer;
/** Define image background styles as color, gradient, or image with optional overlay settings */
type ImageBackground = {
    type: 'color';
    value: string;
} | {
    type: 'gradient';
    from: string;
    to: string;
    direction?: string;
} | {
    type: 'image';
    url: string;
    overlay?: string;
    overlayOpacity?: number;
};
/** Define the structure for an image slide with a background and multiple layers */
interface ImageSlide {
    background: ImageBackground;
    layers: ImageLayer[];
}
/** Define the structure for image content containing an array of image slides */
interface ImageContent {
    slides: ImageSlide[];
}
/** Define properties for a video scene displaying animated text with optional background and effects */
interface VideoTextAnimationScene {
    type: 'text-animation';
    durationSeconds: number;
    headline: string;
    subtext?: string;
    animation?: 'fade' | 'slide-up' | 'typewriter';
    background?: ImageBackground;
}
/** Define a scene that reveals an image with optional caption over a specified duration */
interface VideoImageRevealScene {
    type: 'image-reveal';
    durationSeconds: number;
    imageUrl: string;
    caption?: string;
}
/** Define a video slide scene with duration and associated image slide details */
interface VideoSlideScene {
    type: 'slide';
    durationSeconds: number;
    slide: ImageSlide;
}
/** Define a countdown scene with duration, start time, and optional label for video sequences */
interface VideoCountdownScene {
    type: 'countdown';
    durationSeconds: number;
    from: number;
    label?: string;
}
/** Resolve a video scene as one of several specific animation or reveal types */
type VideoScene = VideoTextAnimationScene | VideoImageRevealScene | VideoSlideScene | VideoCountdownScene;
/** Define video caption segments with start and end times and associated text content */
interface VideoCaption {
    startSeconds: number;
    endSeconds: number;
    text: string;
}
/** Describe video content including duration, scenes, optional audio, captions, and rendered URL */
interface VideoContent {
    durationSeconds: number;
    scenes: VideoScene[];
    audioUrl?: string;
    captions?: VideoCaption[];
    renderedUrl?: string;
}
/** Define platform options for copy content across various social media and communication channels */
type CopyPlatform = 'instagram' | 'tiktok' | 'x' | 'linkedin' | 'sms' | 'email-subject';
/** Define the structure for content with headline, body, platform, and optional hashtags and character count */
interface CopyContent {
    headline: string;
    body: string;
    hashtags?: string[];
    platform: CopyPlatform;
    characterCount?: number;
}
/** Map asset keys to their corresponding content types for various media and copy formats */
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;
};
/** Define the structure and metadata for an asset including its format, brand, content, and status */
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;
}
/** Describe an asset variant with identification, approval status, and edit history details */
interface AssetVariant {
    id: string;
    parentId: string;
    label: string;
    spec: AssetSpec;
    approvedAt?: string;
    rejectedAt?: string;
    editLog: ApprovalEvent[];
}
/** Describe an approval event with action details, user info, and optional edited fields */
interface ApprovalEvent {
    assetId: string;
    variantId?: string;
    action: 'approved' | 'rejected' | 'edited' | 'scheduled';
    editedFields?: string[];
    userId: string;
    timestamp: string;
}
/** Define metrics for tracking impressions, clicks, conversions, and related rates */
interface ConversionMetrics {
    impressions: number;
    clicks: number;
    conversions: number;
    ctr: number;
    cvr: number;
}

/** Validate brand token properties including colors, font, logo URL, business name, and voice */
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>;
/** Validate and parse email content objects with subject, optional preheader, and sections */
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>;
/** Validate image content with an array of one or more slides containing background details */
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<{
                normal: "normal";
                bold: "bold";
            }>>;
            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>;
/** Define the schema for validating video content including duration, scenes, audio, captions, and rendered URL */
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<{
                    normal: "normal";
                    bold: "bold";
                }>>;
                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>;
/** Validate and parse copy content with headline, body, optional hashtags, platform, and character count */
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>;
/** Validate approval event data including asset, action, user, timestamp, and optional fields */
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>;
/** Validate conversion metrics with nonnegative impressions, clicks, conversions, CTR, and CVR fields */
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 };
