using JiShe.CollectBus.Protocol.Interfaces;
using Microsoft.Extensions.Logging;

namespace JiShe.CollectBus.Protocol.T37612012.Appendix
{
    /// <summary>
    /// 第一套第 6 日时段表数据
    /// </summary>
    public class Appendix_04010006 : IAnalysisStrategy<List<string>>
    {
        private readonly ILogger<Appendix_04010006> _logger;
        private readonly AnalysisStrategyContext _analysisStrategyContext;

        public Appendix_04010006(ILogger<Appendix_04010006> logger, AnalysisStrategyContext analysisStrategyContext)
        {
            _logger = logger;
            _analysisStrategyContext = analysisStrategyContext;
        }

        public async Task<bool> ExecuteAsync(List<string> data, Action<dynamic>? result = null)
        {
            return await _analysisStrategyContext.ExecuteAsync<List<string>>(nameof(Appendix_04010000), data, (values) =>
            {
                values[0] = "第一套第6日第{0}时段起始时间及费率号";
                result?.Invoke(values);
            });
        }
    }
}
