// SPDX-FileCopyrightText: 2024 John Livingston // // SPDX-License-Identifier: AGPL-3.0-only import { html } from 'lit' import { __ } from 'i18n' export function tplMucTask (el, task) { const done = task.get('done') // eslint-disable-next-line no-undef const i18nDelete = __(LOC_task_delete) const doneId = 'livechat-task-done-id-' + task.get('id') return !el.edit ? html`
{ task.set('done', !done) task.saveItem() }} />
${task.get('description') ?? ''}
` : html`
${_tplTaskForm(task)}
` } function _tplTaskForm (task) { // eslint-disable-next-line no-undef const i18nTaskName = __(LOC_task_name) // eslint-disable-next-line no-undef const i18nTaskDesc = __(LOC_task_description) return html`
` } export function tplMucAddTaskForm (tasklistEl, _tasklist) { const i18nOk = __('Ok') const i18nCancel = __('Cancel') return html`
${_tplTaskForm(undefined)}
` }