from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import Pet


class SignupForm(UserCreationForm):
    email = forms.EmailField(label="Email Address")

    class Meta:
        model = User
        fields = ['first_name', 'last_name', 'username',
                  'email', 'password1', 'password2']


class UserUpdateForm(forms.ModelForm):
    email = forms.EmailField()

    class Meta:
        model = User
        fields = ['username', 'email']


PET_TYPES = [
    ('dog', 'Dog'),
    ('cat', 'Cat'),
    ('rabbit', 'Rabbit'),
]


class PetUpdateForm(forms.ModelForm):

    class Meta:
        model = Pet
        fields = ['pet_type', 'pet_age', 'pet_breed']
