using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hotline.FlowEngine.Notifications;
using Hotline.FlowEngine.WorkflowModules;
using Hotline.Orders;
using MediatR;

namespace Hotline.Application.Handlers.FlowEngine
{
    public class AcceptWorkflowHandler : INotificationHandler<AcceptWorkflowNotify>
    {
        private readonly IOrderDomainService _orderDomainService;

        public AcceptWorkflowHandler(IOrderDomainService orderDomainService)
        {
            _orderDomainService = orderDomainService;
        }

        /// <summary>Handles a notification</summary>
        /// <param name="notification">The notification</param>
        /// <param name="cancellationToken">Cancellation token</param>
        public async Task Handle(AcceptWorkflowNotify notification, CancellationToken cancellationToken)
        {
            var workflow = notification.Workflow;

            switch (workflow.ModuleCode)
            {
                case WorkflowModuleConsts.OrderHandle:
                    //await _orderDomainService.AcceptAsync(notification.Workflow.ExternalId, cancellationToken);
                    break;
            }
        }
    }
}
