// SPDX-FileCopyrightText: 2024 John Livingston
//
// SPDX-License-Identifier: AGPL-3.0-only
import { html } from 'lit'
import { repeat } from 'lit/directives/repeat.js'
import { __ } from 'i18n'
import { tplMucAddTaskForm } from './muc-task'
export default function tplMucTaskList (el, tasklist) {
const tasks = tasklist.getTasks()
// eslint-disable-next-line no-undef
const i18nDelete = __(LOC_task_list_delete)
// eslint-disable-next-line no-undef
const i18nCreateTask = __(LOC_task_create)
// eslint-disable-next-line no-undef
const i18nTaskListName = __(LOC_task_list_name)
return html`
${el.collapsed
? html`
`
: html`
`
}
${!el.edit
? html`
`
: html`
`
}
${el.collapsed
? ''
: repeat(tasks, (task) => task.get('id'), (task) => {
return html``
})
}
${!el.add_task_form_opened
? ''
: tplMucAddTaskForm(el, tasklist)
}`
}