{% load i18n %}
<tr class="border-t border-solid border-gray-200 hover:bg-gray-100">
    <td class="pl-2">
        <a title="{% if push_notification_translation.title %} {{ push_notification_translation.title }}{% endif %}"
           href="{% url 'edit_push_notification' push_notification_id=push_notification.id region_slug=request.region.slug language_slug=language.slug %}"
           class="block py-3 px-2 text-gray-800">
            {% if push_notification_translation.title %}
                {{ push_notification_translation.title|truncatechars:35 }}
            {% else %}
                <i>{% translate "Title not available" %}</i>
            {% endif %}
        </a>
    </td>
    <td>
        <a href="{% url 'edit_push_notification' push_notification_id=push_notification.id region_slug=request.region.slug language_slug=language.slug %}"
           class="block py-3 px-2 text-gray-800">
            {{ push_notification.get_channel_display }}
        </a>
    </td>
    <td>
        <div class="block py-3 px-2 text-gray-800">
            <div class="lang-grid">
                {% spaceless %}
                    {% for other_language in languages %}
                        <a href="{% url 'edit_push_notification' push_notification_id=push_notification.id region_slug=request.region.slug language_slug=other_language.slug %}">
                            <i icon-name="{% if other_language in push_notification.languages %}pen-line{% else %}plus{% endif %}"
                               class="text-gray-800"></i>
                        </a>
                    {% endfor %}
                {% endspaceless %}
            </div>
        </div>
    </td>
    <td class="pr-2">
        {{ push_notification_translation.last_updated }}
    </td>
    <td class="pr-2">
        {% if push_notification.scheduled_send_date_local %}
            {% if push_notification.draft %}
                <i icon-name="calendar-off"></i>
            {% else %}
                <i icon-name="calendar-clock"></i>
            {% endif %}
            {{ push_notification.scheduled_send_date_local }}
            {% if push_notification.draft %}
                ({% translate "Draft" %})
            {% endif %}
        {% endif %}
    </td>
    <td class="pl-2 pr-4 whitespace-nowrap">
        {% if push_notification.sent_date %}
            <i icon-name="check" class="text-green-500 align-text-top"></i> {{ push_notification.sent_date }}
        {% elif push_notification.is_overdue %}
            <i icon-name="x" class="text-red-500 align-text-top"></i> {% translate "Message is overdue and will not be sent" %}
        {% else %}
            <i icon-name="x" class="text-red-500 align-text-top"></i> {% translate "Message not sent yet" %}
        {% endif %}
    </td>
</tr>
