// Copyright © Selmo Technology GmbH. All Rights Reserved

using Radzen;

namespace SelmoStudio.Hmi.Server.SelmoHmi.Shared.WellKnownTypes
{
    public enum WellKnownTooltipPosition
    {
        Top,
        Bottom,
        Left,
        Right
    }

    public static class WellKnownTooltipPositionExtensions
    {
        public static TooltipPosition MapToRadzen(this WellKnownTooltipPosition position)
        {
            return position switch
            {
                WellKnownTooltipPosition.Top => TooltipPosition.Top,
                WellKnownTooltipPosition.Bottom => TooltipPosition.Bottom,
                WellKnownTooltipPosition.Left => TooltipPosition.Left,
                WellKnownTooltipPosition.Right => TooltipPosition.Right,
                _ => throw new NotSupportedException(),
            };
        }
    }
}