from django import forms

from newsreader.core.forms import CheckboxInput
from newsreader.news.collection.forms.base import CollectionRuleForm
from newsreader.news.collection.models import CollectionRule


class FeedForm(CollectionRuleForm):
    class Meta:
        model = CollectionRule
        fields = ("name", "url", "favicon", "category")


class OPMLImportForm(forms.Form):
    file = forms.FileField(allow_empty_file=False)
    skip_existing = forms.BooleanField(
        initial=False, required=False, widget=CheckboxInput
    )
