"""
Email template request schemas.

Phase 1 Step 4: extracted from ``compliance.api.email_template_routes``.
"""

from typing import Optional

from pydantic import BaseModel


class TemplateCreate(BaseModel):
    template_type: str
    name: Optional[str] = None
    description: Optional[str] = None
    category: Optional[str] = None
    is_active: bool = True


class VersionCreate(BaseModel):
    version: str = "1.0"
    language: str = "de"
    subject: str
    body_html: str
    body_text: Optional[str] = None


class VersionUpdate(BaseModel):
    subject: Optional[str] = None
    body_html: Optional[str] = None
    body_text: Optional[str] = None


class PreviewRequest(BaseModel):
    variables: Optional[dict[str, str]] = None


class SendTestRequest(BaseModel):
    recipient: str
    variables: Optional[dict[str, str]] = None


class SettingsUpdate(BaseModel):
    sender_name: Optional[str] = None
    sender_email: Optional[str] = None
    reply_to: Optional[str] = None
    logo_url: Optional[str] = None
    primary_color: Optional[str] = None
    secondary_color: Optional[str] = None
    footer_text: Optional[str] = None
    company_name: Optional[str] = None
    company_address: Optional[str] = None


__all__ = [
    "TemplateCreate",
    "VersionCreate",
    "VersionUpdate",
    "PreviewRequest",
    "SendTestRequest",
    "SettingsUpdate",
]
