using e_suite.Workflow.Core.Attributes;
using e_suite.Workflow.Core.Enums;
using e_suite.Workflow.Core.Interfaces;
using eSuite.Core.Miscellaneous;

namespace e_suite.Workflow.Core.Tasks;

[GeneralTask(taskIcon: "faFileLines")]
public class FormDataInputTask : TaskBase, IAssignees<TaskAssignee, DefaultOutcome>, IFormTemplate
{
    public List<TaskAssignee> Assignees { get; set; } = [];
    public CompletionRule<DefaultOutcome> AssigneesCompletionRule { get; set; }
    public bool IsMultiple { get; set; }
    public required IGeneralIdRef FormIdRef { get; set; }

    public IEnumerable<string> ValidateForTemplate()
    {
        if (FormIdRef == null)
            yield return "FormIdRef is required.";
    }
    public List<OutcomeAction<DefaultOutcome>> OutcomeActions { get; set; } = [];
}