from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, SelectField
from wtforms.validators import DataRequired


class QRGenerator(FlaskForm):
    code_content = StringField('Content', validators=[DataRequired()])
    code_size = SelectField('Size', choices=[('15', 'Size'),
                                             ('5', '5'),
                                             ('10', '10'),
                                             ('15', '15'),
                                             ('20', '20'),
                                             ('25', '25'),
                                             ('30', '30')])
    code_color = SelectField('Colour', choices=[('white', 'Colour'),
                                                ("white", "White"),
                                                ('yellow', "Yellow"),
                                                ('lime', "Green"),
                                                ("#ffa500", "Orange")])
    code_correction = SelectField('Error Correction', choices=[("H", "Error Correction"),
                                                               ("H", "H"),
                                                               ("L", "L"),
                                                               ("M", "M"),
                                                               ("Q", "Q")])
    code_image = StringField('Image URL')
    generate_code = SubmitField('Generate QR Code')

[((8, 16, 14, 59), 'wtforms.SelectField', 'SelectField', (), '', False, 'from wtforms import StringField, SubmitField, SelectField\n'), ((15, 17, 19, 71), 'wtforms.SelectField', 'SelectField', (), '', False, 'from wtforms import StringField, SubmitField, SelectField\n'), ((20, 22, 24, 75), 'wtforms.SelectField', 'SelectField', (), '', False, 'from wtforms import StringField, SubmitField, SelectField\n'), ((25, 17, 25, 41), 'wtforms.StringField', 'StringField', ({(25, 29, 25, 40): '"""Image URL"""'}, {}), "('Image URL')", False, 'from wtforms import StringField, SubmitField, SelectField\n'), ((26, 20, 26, 51), 'wtforms.SubmitField', 'SubmitField', ({(26, 32, 26, 50): '"""Generate QR Code"""'}, {}), "('Generate QR Code')", False, 'from wtforms import StringField, SubmitField, SelectField\n'), ((7, 54, 7, 68), 'wtforms.validators.DataRequired', 'DataRequired', ({}, {}), '()', False, 'from wtforms.validators import DataRequired\n')]