{% load dash_tags %}
{% if widget.name == '_selected_action' %}
    {% with widget=widget|apply_class_to_widget:'checkbox-xs checkbox' %}
        <input type="{{ widget.type }}" name="{{ widget.name }}" {% if widget.value != None %}
               value="{{ widget.value|stringformat:'s' }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}  >
    {% endwith %}
{% else %}
    <label class="toggle toggle-sm toggle-primary checked:border-success checked:bg-success text-base-content">
        <input type="{{ widget.type }}" name="{{ widget.name }}" {% if widget.value != None %}
               value="{{ widget.value|stringformat:'s' }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}  >
        <svg
                aria-label="enabled"
                xmlns="http://www.w3.org/2000/svg"
                viewBox="0 0 24 24"
                fill="none"
                stroke="currentColor"
                stroke-width="4"
                stroke-linecap="round"
                stroke-linejoin="round"
        >
            <path d="M18 6 6 18"/>
            <path d="m6 6 12 12"/>
        </svg>
        <svg aria-label="disabled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
            <g
                    stroke-linejoin="round"
                    stroke-linecap="round"
                    stroke-width="4"
                    fill="none"
                    stroke="currentColor"
            >
                <path d="M20 6 9 17l-5-5"></path>
            </g>
        </svg>
    </label>
{% endif %}


