// Copyright © Selmo Technology GmbH. All Rights Reserved

using SelmoStudio.Hmi.Common.SelmoProject.Cmz;
using SelmoStudio.Hmi.Server.Alarms.Model;

namespace SelmoStudio.Hmi.Server.SelmoHmi.Cmz.Model.Mapper
{
    internal class CmzTypeToAlarmSeverityMapper
    {
        internal static Severity Map(CmzType cmzType) => cmzType switch
        {
            CmzType.Standard or CmzType.FatalFault or CmzType.GateFortressFault => Severity.Error,
            CmzType.WarningFault => Severity.Warning,
            _ => throw new NotSupportedException("Cmz type is not supported")
        };
    }
}
