from pydantic import BaseModel
from typing import List, Optional

DEFAULT_NOTE_ASSIGNMENT_COLORS: List[str] = [
    "#67E8F9", "#5EEAD4", "#6EE7B7", "#86EFAC",
    "#BEF264", "#FDE68A", "#FCD34D", "#FBBF24",
    "#FDBA74", "#FB923C", "#F97316", "#FB7185",
    "#F87171", "#EF4444", "#DC2626", "#B91C1C",
]


class MelodySettings(BaseModel):
    available_languages: List[str] = ["en", "el", "sr"]
    primary_language: str = "en"
    quick_colors: List[str] = ["#FF5733", "#33FF57", "#3357FF", "#FFD700", "#FF69B4", "#8B4513"]
    note_assignment_colors: List[str] = DEFAULT_NOTE_ASSIGNMENT_COLORS
    duration_values: List[int] = [
        0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180,
        240, 300, 360, 420, 480, 540, 600, 900,
    ]


class MelodySettingsUpdate(BaseModel):
    available_languages: Optional[List[str]] = None
    primary_language: Optional[str] = None
    quick_colors: Optional[List[str]] = None
    note_assignment_colors: Optional[List[str]] = None
    duration_values: Optional[List[int]] = None
