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, 'wtforms.SelectField', 'SelectField', (['"""Size"""'], {'choices': "[('15', 'Size'), ('5', '5'), ('10', '10'), ('15', '15'), ('20', '20'), (\n    '25', '25'), ('30', '30')]"}), False, 'from wtforms import StringField, SubmitField, SelectField\n'), (15, 'wtforms.SelectField', 'SelectField', (['"""Colour"""'], {'choices': "[('white', 'Colour'), ('white', 'White'), ('yellow', 'Yellow'), ('lime',\n    'Green'), ('#ffa500', 'Orange')]"}), False, 'from wtforms import StringField, SubmitField, SelectField\n'), (20, 'wtforms.SelectField', 'SelectField', (['"""Error Correction"""'], {'choices': "[('H', 'Error Correction'), ('H', 'H'), ('L', 'L'), ('M', 'M'), ('Q', 'Q')]"}), False, 'from wtforms import StringField, SubmitField, SelectField\n'), (25, 'wtforms.StringField', 'StringField', (['"""Image URL"""'], {}), False, 'from wtforms import StringField, SubmitField, SelectField\n'), (26, 'wtforms.SubmitField', 'SubmitField', (['"""Generate QR Code"""'], {}), False, 'from wtforms import StringField, SubmitField, SelectField\n'), (7, 'wtforms.validators.DataRequired', 'DataRequired', ([], {}), False, 'from wtforms.validators import DataRequired\n')]