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

namespace Hotline.Share.Dtos.CallCenter
{
    public class IvrDto
    {
        public string? Id { get; set; }

        /// <summary>
        /// IVR类型
        /// </summary>
        public EIvrType IvrType { get; set; }
        public string IvrTypeText => IvrType.GetDescription();

        /// <summary>
        /// 语音菜单编号（讯时设备MenuId）
        /// </summary>
        public string No { get; set; }

        /// <summary>
        /// 多条语音以'+'拼接
        /// </summary>
        public string Voice { get; set; }

        public int Repeat { get; set; }

        public int InfoLength { get; set; }

        public string Exit { get; set; }

        /// <summary>
        /// 上一个语音菜单
        /// </summary>
        public string? PrevIvrNo { get; set; }

        /// <summary>
        /// 每个IVR分类中有且只有一个根节点
        /// </summary>
        public bool IsRoot { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Ivr分类Id
        /// </summary>
        public string IvrCategoryId { get; set; }

        /// <summary>
        /// IVR策略
        /// </summary>
        public List<IvrStrategy> IvrStrategies { get; set; } = new();

        public IReadOnlyList<IvrDto> ChildIvrs { get; set; }
    }
}
