using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace SlnMesnac.WPF.Converter.AgvAndTask
{
    public class AgvNameConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is long nextPointId) // 检查是否为 long 类型
            {
                return nextPointId switch
                {
                    8 => "2楼叉车",
                    9 => "3楼叉车",
                    _ => "未知AGV",
                };
            }

            return "未知AGV"; // 如果值不是 long 类型，返回未知AGV

        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
