//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Partly generated from
//     https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;

namespace Spectre.Console
{
    public abstract partial class Spinner
    {
        {{~ for spinner in spinners ~}}
        private sealed class {{ spinner.normalized_name }}Spinner : Spinner
        {
            public override TimeSpan Interval => TimeSpan.FromMilliseconds({{ spinner.interval }});
            public override bool IsUnicode => {{ spinner.unicode }};
            public override IReadOnlyList<string> Frames => new List<string>
            {
                {{~ for frame in spinner.frames ~}}
                    "{{ frame }}",
                {{~ end ~}}
            };
        }
        {{~ end ~}}

        /// <summary>
        /// Contains all predefined spinners.
        /// </summary>
        public static class Known
        {
            {{~ for spinner in spinners ~}}
            /// <summary>
            /// Gets the "{{ spinner.name }}" spinner.
            /// </summary>
            public static Spinner {{ spinner.normalized_name }} { get; } = new {{ spinner.normalized_name }}Spinner();
            {{~ end ~}}
        }
    }
}
