"""
Custom widgets for forms.
"""
from django import forms
from django.utils.safestring import mark_safe


class CheckboxSelectMultipleWidget(forms.CheckboxSelectMultiple):
    """
    Custom widget that displays selected items as tags in an input field
    with a dropdown containing checkboxes for selection.
    """
    
    template_name = 'mainapp/widgets/checkbox_select_multiple.html'
    
    class Media:
        css = {
            'all': ('css/checkbox-select-multiple.css',)
        }
        js = ('js/checkbox-select-multiple.js',)
