{% import "components/ui/v1.html" as ui_v1 %}

{{ _('小节') }} · {{ chapter.lessons.length }}

{% if canManage %}{{ _('创建节') }}{% endif %}
{% if chapter.lessons.length %}
    {% for lesson in chapter.lessons %}
  1. {{ loop.index }}. {{ lesson.title }}

    {{ lesson.pids.length }} {{ _('题目') }} {% if lesson.hidden %}{{ ui_v1.badge(_('已隐藏'), 'warning') }}{% endif %}
    {{ _('预览') }} {% if canManage %} {{ _('编辑') }}
    {% endif %}
  2. {% endfor %}
{% else %}{{ ui_v1.empty_state(_('本章还没有节。')) }}{% endif %}