using Common.Models;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{
    public static class EnumHelper
    {
        // 获取枚举所有值（可在 XAML 中直接引用）
        public static IEnumerable<FunctionTypeEnum> FunctionTypes =>
            Enum.GetValues(typeof(FunctionTypeEnum)).Cast<FunctionTypeEnum>();

        //反应功能枚举
        public static IEnumerable<ReactFunctionTypeEnum> ReactFunctionTypes =>
          Enum.GetValues(typeof(ReactFunctionTypeEnum)).Cast<ReactFunctionTypeEnum>();

        //SampleBottleTypeEnum
        public static IEnumerable<SampleBottleTypeEnum> SampleBottleTypes =>
          Enum.GetValues(typeof(SampleBottleTypeEnum)).Cast<SampleBottleTypeEnum>();

        public static IEnumerable<PowderBottleTypeEnum> PowderBottleTypes =>
         Enum.GetValues(typeof(PowderBottleTypeEnum)).Cast<PowderBottleTypeEnum>();

        /// <summary>
        /// 高温反应  低温反应
        /// </summary>
        public static IEnumerable<SampleBottleReactTemperatureEnum> ReactTemperatureEnums =>
            Enum.GetValues(typeof(SampleBottleReactTemperatureEnum)).Cast<SampleBottleReactTemperatureEnum>();

        /// <summary>
        /// 操作类型 取样/加液
        /// </summary>
        public static IEnumerable<ReactOperationEnum> ReactOperateTypeEnums =>
         Enum.GetValues(typeof(ReactOperationEnum)).Cast<ReactOperationEnum>();

        /// <summary>
        /// 反应取样方式枚举   穿刺取样/开盖取样
        /// </summary>
        public static IEnumerable<SampleMethod> ReactSampleTypeEnums =>
           Enum.GetValues(typeof(SampleMethod)).Cast<SampleMethod>();

        /// <summary>
        /// 加液方式  穿刺加液/开盖加液
        /// </summary>
        public static IEnumerable<AddLiquidMethod> AddLiquidTypeEnums =>
          Enum.GetValues(typeof(AddLiquidMethod)).Cast<AddLiquidMethod>();


        /// <summary>
        /// 稀释方式 
        /// </summary>
        public static IEnumerable<DiluteMethod> DiluteTypeEnums =>
          Enum.GetValues(typeof(DiluteMethod)).Cast<DiluteMethod>();

        public static IEnumerable<TipTypeEnum> TipHeadTypeEnums =>
            Enum.GetValues(typeof(TipTypeEnum)).Cast<TipTypeEnum>();

        public static IEnumerable<BoxTypeEnum> BoxTypeEnums =>
              Enum.GetValues(typeof(BoxTypeEnum)).Cast<BoxTypeEnum>();

        public static IEnumerable<BoxTypeEnum> BoxTypeEnumsSampleSource = new ObservableCollection<BoxTypeEnum>() { BoxTypeEnum._40mL原液工装, BoxTypeEnum._12mL样品工装, BoxTypeEnum._5mL样品工装 };
    }
}
