using Hotline.Share.Enums.CallCenter;
using XF.Utility.EnumExtensions;

namespace Hotline.Share.Dtos.CallCenter;

public class IvrStrategy
{
    /// <summary>
    /// 按键输入内容
    /// </summary>
    public string? Input { get; set; }

    /// <summary>
    /// IVR策略类型
    /// </summary>
    public EIvrStrategeType IvrStrategeType { get; set; }
    public string IvrStrategeTypeText => IvrStrategeType.GetDescription();
    /// <summary>
    /// 响应类型(依据不同策略响应分为不同类型)
    /// </summary>
    public IvrAnswer Answer { get; set; }

    /// <summary>
    /// 分机组优先级，转到分机组的策略需配置(此排序数组中不存在的分机组，不会收到来电转接)
    /// </summary>
    public List<GroupSort> GroupSorts { get; set; }
}

public class GroupSort
{
    public int Sort { get; set; }

    /// <summary>
    /// 分机组编号
    /// </summary>
    public string GroupNo { get; set; }
}

public class IvrAnswer
{
    /// <summary>
    /// 响应类型(依据不同策略响应分为不同类型)
    /// </summary>
    public EIvrAnswerType IvrAnswerType { get; set; }
    public string IvrAnswerTypeText => IvrAnswerType.GetDescription();


    /// <summary>
    /// 响应内容
    /// </summary>
    public string? Content { get; set; }

    /// <summary>
    /// 插播语音文件
    /// </summary>
    public string? PreVoice { get; set; }
}