"""
GUI Model layer.
Data classes for conversion configuration and state.
"""
from dataclasses import dataclass, field


@dataclass
class ConversionConfig:
    input_dir: str = ""
    output_dir: str = ""
    source_lang: str = ""
    target_lang: str = ""
    api_key: str = ""
    model: str = "claude-sonnet-4-20250514"
    encoding: str = "utf-8"
    extra_instructions: str = ""
    enable_resume: bool = True
    enable_context: bool = True
    enable_ecosystem: bool = True


@dataclass
class ConversionState:
    is_running: bool = False
    cancel_flag: bool = False
    total_files: int = 0
    current_index: int = 0
    current_file: str = ""
    success_count: int = 0
    error_count: int = 0
    skipped_count: int = 0
    details: list = field(default_factory=list)

    def reset(self):
        self.is_running = False
        self.cancel_flag = False
        self.total_files = 0
        self.current_index = 0
        self.current_file = ""
        self.success_count = 0
        self.error_count = 0
        self.skipped_count = 0
        self.details = []


# Model choices for the API
MODEL_OPTIONS = [
    ("Claude Sonnet 4 (default)", "claude-sonnet-4-20250514"),
    ("Claude Haiku 4.5 (fast)", "claude-haiku-4-5-20251001"),
    ("Claude Opus 4", "claude-opus-4-20250514"),
]
