from django import forms

from wagtail.admin.widgets.chooser import AdminPageChooser


class ColorSelect(forms.RadioSelect):
    pass


class VisualSelect(forms.RadioSelect):
    pass


class IconSelect(forms.RadioSelect):
    pass


class AdminLinkChooser(AdminPageChooser):
    def render_html(self, name, value_data, attrs):
        return ""

    def get_value_data(self, value):
        if isinstance(value, str):
            return {
                "id": value,
                "display_title": f"link: {value}",
                "parent_id": None,
                "edit_url": None,
            }

        return super().get_value_data(value)
