using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Media;
using InABox.Core;

namespace InABox.DynamicGrid
{
    public class RichTextEditorViewModel
    {
        #region Constructor

        public RichTextEditorViewModel()
        {
            AddFontFamily();
            AddFontSize();
            VisibleButtons = RichTextEditorButtons.All;
        }

        #endregion

        #region Fields

        #endregion

        #region Properties

        public event PropertyChangedEventHandler PropertyChanged;

        /// <summary>
        ///     Gets or Sets the font family source.
        /// </summary>
        public List<string> FontFamilySource { get; private set; }

        /// <summary>
        ///     Gets or Sets the font size source.
        /// </summary>
        public double[] FontSizeSource { get; private set; }

        public RichTextEditorButtons VisibleButtons { get; set; }
        
        
        
        #endregion

        #region Implementation

        /// <summary>
        ///     Adds the font family.
        /// </summary>
        private void AddFontFamily()
        {
            FontFamilySource = new List<string>();
            foreach (var fontfamily in Fonts.SystemFontFamilies) FontFamilySource.Add(fontfamily.Source);
        }

        /// <summary>
        ///     Adds the font size.
        /// </summary>
        private void AddFontSize()
        {
            FontSizeSource = new double[] { 8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 26, 28, 36, 48, 72 };
        }

        #endregion
    }
}