from wtforms import SelectField, TextAreaField
from wtforms.validators import DataRequired, Length
from app.forms import BaseForm, ContactInfoMixin


class ContactForm(BaseForm, ContactInfoMixin):
    """WTForm matching the contact section HTML fields."""
    subject = SelectField('Subject', choices=[
        ('General Support', 'General Enquiry'),
        ('Services & Consultation', 'Services & Consultation'),
        ('Partnership', 'Partnership / Collaboration'),
        ('Feedback', 'Feedback'),
        ('Other', 'Other')
    ], validators=[
        DataRequired(message="Please select an enquiry type.")
    ])
    
    message = TextAreaField('Message', validators=[
        DataRequired(message="Please enter your message."),
        Length(min=10, max=1000, message="Message must be between 10 and 1000 characters.")
    ])