@if (batchManaging() && view() === 'tasks') {
{{ 'XP.Chat.Automation.SelectedCount' | translate: { Default: selectedTaskIds().size + ' selected', count: selectedTaskIds().size } }}
} @else { @if (view() === 'tasks' && currentTaskCount()) {
} @else if (view() !== 'tasks') { } }
@if (!tasksLoaded()) {
} @else { @switch (view()) { @case ('tasks') { @if (!currentTaskCount()) {

{{ 'XP.Chat.Automation.EmptyTitle' | translate: { Default: 'Start your first automation task' } }}

{{ 'XP.Chat.Automation.TemplateHeading' | translate: { Default: 'Automation templates' } }}

} @else {
{{ 'XP.Chat.Automation.TaskCount' | translate : { Default: visibleCurrentTasks().length + ' tasks', count: visibleCurrentTasks().length } }}
@if (visibleCurrentTasks().length) {
@for (task of visibleCurrentTasks(); track task.id) {
@if (batchManaging()) { } @else { } @if (!batchManaging()) { }
}
} @else {

{{ 'XP.Chat.Automation.NoMatchingTasks' | translate: { Default: 'No matching tasks' } }}

{{ 'XP.Chat.Automation.TryAnotherFilter' | translate: { Default: 'Try a different search or status filter.' } }}

}
} } @case ('history') {

{{ 'XP.Chat.Automation.RunHistory' | translate: { Default: 'Run history' } }}

{{ 'XP.Chat.Automation.RunHistoryDescription' | translate: { Default: 'Review execution results from all scheduled tasks.' } }}

{{ visibleExecutionRecords().length }}
@if (visibleExecutionRecords().length) {
@for (record of visibleExecutionRecords(); track record.id) { }
} @else {

{{ 'XP.Chat.Automation.NoRunHistory' | translate: { Default: 'No run history yet' } }}

{{ 'XP.Chat.Automation.NoRunHistoryDescription' | translate: { Default: 'Execution results will appear here after a scheduled task runs.' } }}

}
} @case ('archived') {

{{ 'XP.Chat.Automation.ArchivedTasks' | translate: { Default: 'Archived tasks' } }}

{{ 'XP.Chat.Automation.ArchivedDescription' | translate: { Default: 'Archived tasks are paused and can be restored at any time.' } }}

{{ visibleArchivedTasks().length }}
@if (visibleArchivedTasks().length) {
@for (task of visibleArchivedTasks(); track task.id) {
}
} @else {

{{ 'XP.Chat.NoArchivedTasks' | translate: { Default: 'No archived tasks' } }}

{{ 'XP.Chat.Automation.NoArchivedDescription' | translate: { Default: 'Tasks you archive will be kept here.' } }}

}
} } }
@if (openedTask(); as task) { } @if (templatePickerOpen()) { } @if (loading()) {
}
@for (template of automationTemplates; track template.key) { }
@switch (status) { @case (eXpertTaskStatus.SCHEDULED) { } @case (eXpertTaskStatus.PAUSED) { } @case (eXpertTaskStatus.ARCHIVED) { } @default { } } @switch (status) { @case (eXpertTaskStatus.SCHEDULED) { {{ 'XP.Xpert.Scheduled' | translate: { Default: 'Scheduled' } }} } @case (eXpertTaskStatus.PAUSED) { {{ 'XP.Xpert.Paused' | translate: { Default: 'Paused' } }} } @case (eXpertTaskStatus.ARCHIVED) { {{ 'XP.Xpert.Archived' | translate: { Default: 'Archived' } }} } }