from pydantic import BaseModel, HttpUrl
from typing import List, Optional

class MediaCategoryResponse(BaseModel):
    id: str
    title: str
    type: str
    icon: Optional[str] = None
    logo_url: Optional[str] = None
    color_hex: str
    playlist_url: str
    requires_pin: bool = False

class MediaProviderResponse(BaseModel):
    id: str
    name: str
    logo_url: Optional[str] = None
    is_active: bool
    categories: List[MediaCategoryResponse]

class MediaConfigData(BaseModel):
    title: str
    description: str
    pin: Optional[str] = "1122"
    providers: List[MediaProviderResponse]

class MediaConfigResponse(BaseModel):
    status: str = "success"
    data: MediaConfigData
