using System.Collections.Generic;

namespace Stat.Html
{
    public class Navigate
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public static string Get(IList<Stat.Model.Navigate> list)
        {
            System.Text.StringBuilder tep = new System.Text.StringBuilder();

            if (list.Count > 0)
            {
                for (int i = 0; i < list.Count; i++)
                {

                    tep.Append("<a href=\"" + list[i].Source + "\" target=\"_blank\">" + list[i].title + "</a>");

                    if (i != list.Count - 1)
                    {
                        tep.Append(" | ");
                    }
                }
            }
            return tep.ToString();
        }
    }
}
