<div {{ attributes }}>
    {% if this.projects is empty %}
    {% else %}
        <ul role="list" class="divide-y divide-gray-200 dark:divide-gray-700">
            {% for project in this.projects %}
                <li class="py-3 sm:py-4">
                    <div class="flex items-center">
                        <div
                            class="flex h-8 w-8 shrink-0 items-center justify-center justify-items-center rounded-full bg-gray-600 p-6 text-gray-100">
                            {{ project.name|slice(0, 1)|capitalize }}
                        </div>
                        <div class="ms-4 min-w-0 flex-1">
                            <p class="truncate text-sm font-medium text-gray-900 dark:text-white">
                                {{ project.name }}
                            </p>

                            {% if project.domainOut %}
                                <p class="truncate text-sm text-gray-500 dark:text-gray-400">
                                    {{ project.domainOut }}
                                    <span class="text-xs">{{ project.domainIn }}</span>
                                </p>
                            {% else %}
                                <p class="truncate text-sm text-gray-500 dark:text-gray-400">
                                    {{ project.domainIn }}
                                </p>
                            {% endif %}

                        </div>
                        <div class="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">
                            {% if project.disabled == false %}
                                <button
                                    data-action="live#action"
                                    data-live-action-param="debounce(300)|select"
                                    data-live-project-param="{{ project.id }}"
                                    data-live-tenant-param="{{ app.user.id }}"
                                    id="login"
                                    name="login"
                                    class="border-primary bg-primary hover:border-primary-hover hover:bg-primary-hover focus:border-primary-hover focus:bg-primary-hover flex cursor-pointer items-center justify-center rounded border px-4 py-2 text-center leading-normal text-gray-100 hover:text-white hover:ring-0 focus:ring-0 focus:outline-none">
                                    <svg
                                        xmlns="http://www.w3.org/2000/svg"
                                        width="24"
                                        height="24"
                                        viewBox="0 0 24 24"
                                        fill="none"
                                        stroke="currentColor"
                                        stroke-width="2"
                                        stroke-linecap="round"
                                        stroke-linejoin="round"
                                        class="bi bi-box-arrow-in-right inline-block h-4 w-4 ltr:mr-2 rtl:ml-2">
                                        <path
                                            d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>
                                    </svg>
                                    {{ 'project.manage'|trans([],'serenity_saas_messages.admin')|capitalize }}
                                </button>
                            {% else %}
                                <button
                                    data-action="live#action"
                                    data-live-action-param="debounce(300)|reactivate"
                                    data-live-project-param="{{ project.id }}"
                                    data-live-tenant-param="{{ app.user.id }}"
                                    id="login"
                                    name="login"
                                    class="border-primary flex cursor-pointer items-center justify-center rounded border bg-gray-500 px-4 py-2 text-center leading-normal text-gray-100 hover:border-gray-600 hover:bg-gray-600 hover:text-white hover:ring-0 focus:border-gray-600 focus:bg-gray-600 focus:ring-0 focus:outline-none">
                                    <svg
                                        xmlns="http://www.w3.org/2000/svg"
                                        width="24"
                                        height="24"
                                        viewBox="0 0 24 24"
                                        fill="none"
                                        stroke="currentColor"
                                        stroke-width="2"
                                        stroke-linecap="round"
                                        stroke-linejoin="round"
                                        class="bi bi-box-arrow-in-right inline-block h-4 w-4 ltr:mr-2 rtl:ml-2">
                                        <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>
                                        <path d="M3 3v5h5"/>
                                    </svg>
                                    {{ 'project.reactivate'|trans([],'serenity_saas_messages.admin')|capitalize }}
                                </button>
                            {% endif %}
                        </div>
                    </div>
                </li>
            {% endfor %}
        </ul>
    {% endif %}
</div>
