from pydantic import BaseModel, Field


class VenueBookingSettingsRead(BaseModel):
    venue_id: int
    venue_name: str
    turn_duration_minutes: int
    whatsapp_enabled: bool
    whatsapp_assistant_prompt: str
    whatsapp_assistant_base_prompt: str
    whatsapp_assistant_effective_prompt: str
    whatsapp_business_account_id: str
    whatsapp_business_id: str
    whatsapp_phone_number_id: str
    whatsapp_display_phone_number: str
    whatsapp_verified_name: str
    whatsapp_access_token_configured: bool
    whatsapp_phone_number_id_saved: bool
    whatsapp_access_token_saved: bool
    whatsapp_uses_global_fallback: bool


class VenueBookingSettingsUpdate(BaseModel):
    turn_duration_minutes: int = Field(ge=30, le=600)
    whatsapp_assistant_prompt: str = Field(default="", max_length=4000)
    whatsapp_business_account_id: str = Field(default="", max_length=200)
    whatsapp_business_id: str = Field(default="", max_length=200)
    whatsapp_phone_number_id: str = Field(default="", max_length=200)
    whatsapp_display_phone_number: str = Field(default="", max_length=200)
    whatsapp_verified_name: str = Field(default="", max_length=200)
    whatsapp_access_token: str | None = Field(default=None, max_length=4000)
    reset_whatsapp_access_token: bool = False
