// Copyright © Selmo Technology GmbH. All Rights Reserved

using SelmoStudio.Hmi.Common.SelmoProject.Ids;
using SelmoStudio.Hmi.Common.SelmoProject.WellknownIds;

namespace SelmoStudio.Hmi.Server.SelmoHmi.Shared.Mappers
{
    public static class WaitingInfoText
    {
        public static List<string> Get(List<SelmoHmiWaitingForId> ids)
        {
            var mappedIds = new List<string>();
            foreach (var id in ids)
            {
                if (WaitingInfos.ContainsKey(id))
                {
                    mappedIds.Add(WaitingInfos[id]);
                }
            }
            return mappedIds;
        }

        private static Dictionary<SelmoHmiWaitingForId, string> WaitingInfos = new()
        {
            { WellKnownWaitingForIds.InternalReservedBit0, "Internal: reserved bit 0"},
            { WellKnownWaitingForIds.ManualOperationComplete,"Manual Operation Complete"},
            { WellKnownWaitingForIds.PressAutomaticRelease,"Press automatic release for 3 seconds"},
            { WellKnownWaitingForIds.WaitingSingleStep, "Waiting 'Step Single' button pressed (only in Single Step Mode)"},
            { WellKnownWaitingForIds.EOCReached,"End of Cycle reached"},
            { WellKnownWaitingForIds.WaitingForAutomatic,"Waiting for Automatic select"},
            { WellKnownWaitingForIds.ManualFreeStillSelected,"Manual Free still selected"},
            { WellKnownWaitingForIds.InternalReservedBit07,"Internal: reserved bit 07"},
            { WellKnownWaitingForIds.InternalReservedBit08,"Internal: reserved bit 08"},
            { WellKnownWaitingForIds.InternalReservedBit09,"Internal: reserved bit 09"},
            { WellKnownWaitingForIds.SaftyFunctionsStillSelected,"Safety Function still selected"},
        };
    }
}