# plugins/plant/forms.py

from flask_wtf import FlaskForm
from wtforms import (
    SelectField,
    StringField,
    TextAreaField,
    BooleanField,
    DecimalField,
    SubmitField
)
from wtforms.validators import DataRequired, Optional

class PlantForm(FlaskForm):
    plant_type      = SelectField('Type', validators=[DataRequired()])
    common_name     = SelectField('Common Name', coerce=int, validators=[DataRequired()])
    scientific_name = SelectField('Scientific Name', coerce=int, validators=[DataRequired()])
    mother_uuid     = SelectField('Mother Plant', validators=[Optional()], coerce=str)
    custom_slug     = StringField('Custom Slug', validators=[Optional()])
    vendor_name     = StringField('Vendor Name', validators=[Optional()])
    price           = DecimalField('Price', validators=[Optional()])
    notes           = TextAreaField('Notes', validators=[Optional()])
    data_verified   = BooleanField('Data Verified')
    is_active       = BooleanField('Active')
    submit          = SubmitField('Save Changes')
