# @File: backend/schemas/contact.py
# @Desc: Pydantic schemas for contact / get-price / support form submissions
from typing import Optional

from pydantic import BaseModel, EmailStr, Field


class ContactFormRequest(BaseModel):
    """Payload for the "Contact Us" popup modal."""

    name: str = Field(..., min_length=1, max_length=120)
    email: EmailStr
    phone: Optional[str] = Field(default=None, max_length=40)
    subject: Optional[str] = Field(default=None, max_length=200)
    message: str = Field(..., min_length=1, max_length=5000)


class GetPriceRequest(BaseModel):
    """Payload for the "Get Prices" popup modal."""

    name: str = Field(..., min_length=1, max_length=120)
    email: EmailStr
    phone: Optional[str] = Field(default=None, max_length=40)
    company: Optional[str] = Field(default=None, max_length=200)
    service: Optional[str] = Field(default=None, max_length=200)
    message: Optional[str] = Field(default=None, max_length=5000)


class SupportFormRequest(BaseModel):
    """Payload for the "Support" popup modal (pre-sales / general support)."""

    name: str = Field(..., min_length=1, max_length=120)
    email: EmailStr
    phone: Optional[str] = Field(default=None, max_length=40)
    subject: Optional[str] = Field(default=None, max_length=200)
    message: str = Field(..., min_length=1, max_length=5000)


class ContactFormResponse(BaseModel):
    success: bool = True
    message: str = "Your message has been sent. We will get back to you shortly."