from django import forms

from .models import Evento
from .models import ListaEspera


class EventoForm(forms.ModelForm):
    class Meta:
        model = Evento
        fields = ['nombre', 'descripcion', 'fecha', 'hora', 'plazas_disponibles', 'publicado']

        widgets = {
            'fecha': forms.DateInput(attrs={'type': 'date'}),
        }


class ListaEsperaForm(forms.ModelForm):
    class Meta:
        model = ListaEspera
        fields = []


class MensajeCorreoForm(forms.Form):
    asunto = forms.CharField(
        label="Asunto",
        max_length=200,
        required=True,
        widget=forms.TextInput(attrs={'class': 'form-control'})
    )

    mensaje = forms.CharField(
        label="Mensaje",
        widget=forms.Textarea(attrs={'class': 'form-control', 'rows': 16}),
        required=True
    )
