<div class="gdprmodal gdprfade" id="gdpr-gdprmodal" role="dialog" data-keyboard="false" data-backdrop="{{ backdrop }}">
    <div class="gdprmodal-dialog gdprmodal-dialog-centered">
        <!-- Modal content-->
        <div class="gdprmodal-content">
            <div class="gdprmodal-header">
                <button type="button" class="gdpr_action_button close" data-dismiss="gdprmodal" data-gdpr_action="close">
                    <span class="dashicons dashicons-dismiss">Close</span>
                </button>
            </div>
            <div class="gdprmodal-body">
                <div class="gdpr-details-content">
                    <div class="gdpr-groups-container">
                        <div class="gdpr-about-cookies">{{ __( msg, 'gdpr-cookie-consent' ) }}</div>
                        <ul class="category-group">
                            {% for category in categories %}
                            <li class="category-item">
                                {% if category['gdpr_cookie_category_slug'] == 'necessary' %}
                                    <div class="toggle-group">
                                        <div class="always-active">{{ always }}</div>
                                        <input id="gdpr_messagebar_body_button_{{ category['gdpr_cookie_category_slug'] }}" type="hidden" name="gdpr_messagebar_body_button_{{ category['gdpr_cookie_category_slug'] }}" value="{{ category['gdpr_cookie_category_slug'] }}">
                                    </div>
                                {% else %}
                                    <div class="toggle-group">
                                        <div class="toggle">
                                            <div class="checkbox">
                                                <!-- DYNAMICALLY GENERATE Input ID  -->
                                                <input {% if is_ticked and not viewed_cookie %} checked="checked" {% elseif category['is_ticked'] %} checked="checked" {% endif %} id="gdpr_messagebar_body_button_{{ category['gdpr_cookie_category_slug'] }}" class="category-switch-handler" type="checkbox" name="gdpr_messagebar_body_button_{{ category['gdpr_cookie_category_slug'] }}" value="{{ category['gdpr_cookie_category_slug'] }}">
                                                <label for="gdpr_messagebar_body_button_{{ category['gdpr_cookie_category_slug'] }}">
                                                    <span class="label-text">{{ category['gdpr_cookie_category_name'] }}</span>
                                                </label>
                                                <!-- DYNAMICALLY GENERATE Input ID  -->
                                            </div>
                                        </div>
                                    </div>
                                {% endif %}
                                <div class="gdpr-column gdpr-category-toggle {{ template_parts }}">
                                    <div class="gdpr-columns">
                                        <span class="dashicons dashicons-plus"></span>
                                        <a href="#" class="btn category-header" tabindex="0">{{ __( category['gdpr_cookie_category_name'], 'gdpr-cookie-consent' ) }}</a>
                                    </div>
                                </div>
                                <div class="description-container hide">
                                    <div class="group-description" tabindex="0">{{ __( category['gdpr_cookie_category_description'], 'gdpr-cookie-consent' ) }}</div>
                                    <!-- sub groups -->
                                    {% if button_settings_display_cookies %}
                                    <div class="category-cookies-list-container">
                                        {% if category['total'] >= '1' %}
                                            <table class="table table-striped">
                                                <thead class="thead-dark">
                                                <tr>
                                                    <th>{{ name }}</th>
                                                    <th>{{ domain }}</th>
                                                    <th>{{ purpose }}</th>
                                                    <th>{{ expiry }}</th>
                                                    <th>{{ type }}</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                {% for cookie in category['data'] %}
                                                    <tr>
                                                        <td>{% if cookie['name'] %}{{ cookie['name'] }}{% else %}---{% endif %}</td>
                                                        <td>{% if cookie['domain'] %}{{ cookie['domain'] }}{% else %}---{% endif %}</td>
                                                        <td>{% if cookie['description'] %}{{ cookie['description'] }}{% else %}---{% endif %}</td>
                                                        <td>{% if cookie['duration'] %}{{ cookie['duration'] }}{% else %}---{% endif %}</td>
                                                        <td>{% if cookie['type'] %}{{ cookie['type'] }}{% else %}---{% endif %}</td>
                                                    </tr>
                                                {% endfor %}
                                                </tbody>
                                            </table>
                                        {% endif %}
                                    </div>
                                    {% endif %}
                                </div>
                            </li>
                            {% endfor %}
                        </ul>
                    </div>
                </div>
            </div>
            <div class="gdprmodal-footer">
                {% if show_credits %}
                <div class="powered-by-credits">{{ credits }}</div>
                {% endif %}
                <button id="cookie_action_save" type="button" class="gdpr_action_button btn" data-gdpr_action="accept" data-dismiss="gdprmodal">{{ save_button }}</button>
            </div>
        </div>
    </div>
</div>