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

namespace e_suite.Workflow.Core.Tasks;

public interface ITemplateValidatable
{
    IEnumerable<string> ValidateForTemplate();
}



[GeneralTask]
public class FormDataInputTask : TaskBase, IAssignees<ITaskAssignee>, ITemplateValidatable
{
    public IList<ITaskAssignee> Assignees { get; } = new List<ITaskAssignee>();
    public bool IsMultiple { get; set; }
    public bool ContainsDecision { get; set; }
    public required IGeneralIdRef FormIdRef { get; set; }

    public IEnumerable<string> ValidateForTemplate()
    {
        if (FormIdRef == null)
            yield return "FormIdRef is required.";
    }
}