#!/usr/bin/env python3
"""
Generation Modes - Configuration for different video output formats.

Modes:
- cinematic: 16:9 horizontal videos for general promo
- vertical: 9:16 vertical videos
- wbcard: 3:4 vertical videos for Wildberries product cards (default)

Veo3 Model Naming:
- veo-3.1-fl: Vertical (9:16) with first/last frame
- veo-3.1-landscape-fl: Horizontal (16:9) with first/last frame
- veo-3.1-fast-fl: Fast vertical with frames ($0.15)
- veo-3.1-landscape-fast-fl: Fast horizontal with frames ($0.15)
"""

GENERATION_MODES = {
    "cinematic": {
        "name": "Cinematic (16:9)",
        "aspect_ratio": "16:9",
        "veo3_model": "veo-3.1-landscape-fl",  # Horizontal/landscape format ($0.25)
        "context_hint": "Cinematic horizontal video (16:9)",
    },
    "vertical": {
        "name": "Vertical (9:16)",
        "aspect_ratio": "9:16",
        "veo3_model": "veo-3.1-fl",  # Standard quality ($0.25)
        "context_hint": "Vertical video (9:16). Optimize framing for vertical display.",
    },
    "wbcard": {
        "name": "WB Card (3:4)",
        "aspect_ratio": "3:4",
        "veo3_model": "veo-3.1-fl",  # Standard quality ($0.25)
        "context_hint": "Vertical video for Wildberries product card (3:4). Optimize framing for vertical display.",
        "crop_from_916": True,  # Generate 9:16 with Veo3, then crop to 3:4 from top
    },
}

DEFAULT_MODE = "wbcard"


def get_mode_config(mode: str) -> dict:
    """Get configuration for a specific mode."""
    return GENERATION_MODES.get(mode, GENERATION_MODES[DEFAULT_MODE])


def get_mode_names() -> list:
    """Get list of available mode names."""
    return list(GENERATION_MODES.keys())
