<%- include('partials/header') %>

<%= t('privateLessons.title') %>

<%= t('privateLessons.subtitle') %> <% if (lastSynced) { %> • <%= t('privateLessons.syncedLabel') %> <%= formatTime(lastSynced) %> <% } %>

<% if (formMeta) { %>
<% if (formMeta.photoUrl) { %> <%= formMeta.studentName %> <% } %>

<%= formMeta.studentName %>

<%= formMeta.schoolName %> • <%= formMeta.className %>

<% if (detectedAdvisor) { %>
<%= t('privateLessons.advisorLabel') %> <%= detectedAdvisor %>
<% } %>
<%= t('privateLessons.policyNote') %>
<% } %>

<%= t('privateLessons.requestTitle') %>

<%= t('privateLessons.onlineBadge') %>
<% if (formMeta) { %> <% } else { %> <% } %>

<%= t('privateLessons.myLessonsTitle') %>

<%= allLessons.length %>
<% if (subjects.length > 0) { %>
<% subjects.forEach(function(sub) { %> <% }); %>
<% } %>
<% if (upcomingLessons.length > 0) { %>
<%= t('privateLessons.upcomingGroupTitle') %> <%= t('privateLessons.activeCountBadge', { count: upcomingLessons.length }) %>
<% upcomingLessons.forEach(function(item) { %>
<%= t('privateLessons.upcomingBadge') %> <%= item.date %>
<% if (item.teacherPhoto) { %> <%= item.teacherName %> <% } else { %>
<%= item.teacherName ? item.teacherName[0] : 'Ö' %>
<% } %>

<%= item.subject %>

<%= item.teacherName %>

<% }); %>
<% } %>
<%= t('privateLessons.pastGroupTitle') %> <%= t('privateLessons.pastCountBadge', { count: pastLessons.length }) %>
<% if (pastLessons.length === 0 && upcomingLessons.length === 0) { %>

<%= t('privateLessons.emptyState') %>

<% } else { %>
<% pastLessons.forEach(function(item) { %>
<%= t('privateLessons.completedBadge') %> <%= item.date %>
<% if (item.teacherPhoto) { %> <%= item.teacherName %> <% } else { %>
<%= item.teacherName ? item.teacherName[0] : 'Ö' %>
<% } %>

<%= item.subject %>

<%= item.teacherName %>

<% }); %>
<% } %>
<%- include('partials/footer') %>