from flask_wtf import FlaskForm
from wtforms import TextAreaField, SelectField, SubmitField
from wtforms.validators import DataRequired, Length

class GrowLogForm(FlaskForm):
    event_type = SelectField('Event Type', choices=[
        ('water', 'Watered'),
        ('fertilizer', 'Fertilized'),
        ('repot', 'Repotted'),
        ('note', 'Note'),
        ('pest', 'Pest Observed')
    ], validators=[DataRequired()])

    note = TextAreaField('Notes', validators=[Length(max=1000)])
    submit = SubmitField('Add Log')